STYLE: some m_ to this-> cleanup

This commit is contained in:
Ken Martin 2006-03-15 11:02:08 -05:00
parent 609af5c969
commit 3d96e52261
197 changed files with 3775 additions and 3735 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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());

View File

@ -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;

View File

@ -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);

View File

@ -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;
}

View File

@ -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 )
{

View File

@ -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)

View File

@ -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;
}

View File

@ -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());
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();

View File

@ -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");

View File

@ -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;
}

View File

@ -75,7 +75,7 @@ public:
cmTypeMacro(cmAddLibraryCommand, cmCommand);
private:
std::string m_LibName;
std::string LibName;
};

View File

@ -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;

View File

@ -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);

View File

@ -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;
}

View File

@ -29,19 +29,18 @@ bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
}
const char* define = args[0].c_str();
const char* cacheValue
= m_Makefile->GetDefinition(define);
= this->Makefile->GetDefinition(define);
std::string makeprogram = args[1];
std::string makecommand
= m_Makefile->GetLocalGenerator()
->GetGlobalGenerator()->GenerateBuildCommand(
makeprogram.c_str(), m_Makefile->GetProjectName(), 0,
0, "Release", true);
std::string makecommand = this->Makefile->GetLocalGenerator()
->GetGlobalGenerator()->GenerateBuildCommand
(makeprogram.c_str(), this->Makefile->GetProjectName(), 0,
0, "Release", true);
if(cacheValue)
{
return true;
}
m_Makefile->AddCacheDefinition(define,
this->Makefile->AddCacheDefinition(define,
makecommand.c_str(),
"Command used to build entire project "
"from the command line.",

View File

@ -26,7 +26,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("called with incorrect number of arguments");
return false;
}
const char* cacheValue = m_Makefile->GetDefinition(args[0].c_str());
const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str());
if(cacheValue)
{
// do we need to correct the value?
@ -37,7 +37,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
cmSystemTools::ReplaceString(cv,"/", "_");
cmSystemTools::ReplaceString(cv,"(", "_");
cmSystemTools::ReplaceString(cv,")", "_");
m_Makefile->AddCacheDefinition(args[0].c_str(),
this->Makefile->AddCacheDefinition(args[0].c_str(),
cv.c_str(),
"Name of build.",
cmCacheManager::STRING);
@ -47,7 +47,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
std::string buildname = "WinNT";
if(m_Makefile->GetDefinition("UNIX"))
if(this->Makefile->GetDefinition("UNIX"))
{
buildname = "";
cmSystemTools::RunSingleCommand("uname -a", &buildname);
@ -62,7 +62,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
}
}
std::string compiler = "${CMAKE_CXX_COMPILER}";
m_Makefile->ExpandVariablesInString ( compiler );
this->Makefile->ExpandVariablesInString ( compiler );
buildname += "-";
buildname += cmSystemTools::GetFilenameName(compiler);
cmSystemTools::ReplaceString(buildname,
@ -72,7 +72,7 @@ bool cmBuildNameCommand::InitialPass(std::vector<std::string> const& args)
cmSystemTools::ReplaceString(buildname,
")", "_");
m_Makefile->AddCacheDefinition(args[0].c_str(),
this->Makefile->AddCacheDefinition(args[0].c_str(),
buildname.c_str(),
"Name of build.",
cmCacheManager::STRING);

View File

@ -67,13 +67,14 @@ bool cmCMakeMinimumRequired::InitialPass(std::vector<std::string> const& args)
}
// Save the required version string.
m_Makefile->AddDefinition("CMAKE_MINIMUM_REQUIRED_VERSION",
version_string.c_str());
this->Makefile->AddDefinition("CMAKE_MINIMUM_REQUIRED_VERSION",
version_string.c_str());
// Get the current version number.
int current_major = m_Makefile->GetMajorVersion();
int current_minor = m_Makefile->GetMinorVersion();
int current_patch = m_Makefile->GetPatchVersion();
int current_major = this->Makefile->GetMajorVersion();
int current_minor = this->Makefile->GetMinorVersion();
int current_patch = this->Makefile->GetPatchVersion();
// Parse the required version number. If no patch-level is given
// use zero.

View File

@ -424,12 +424,12 @@ int CCONV cmExecuteCommand(void *arg, const char *name,
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
cmListFileFunction lff;
lff.m_Name = name;
lff.Name = name;
for(int i = 0; i < numArgs; ++i)
{
// Assume all arguments are quoted.
lff.m_Arguments.push_back(cmListFileArgument(args[i], true,
"[CMake-Plugin]", 0));
lff.Arguments.push_back(cmListFileArgument(args[i], true,
"[CMake-Plugin]", 0));
}
return mf->ExecuteCommand(lff);
}

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@ public:
/*
* Is the tomorrow tag set?
*/
bool GetTomorrowTag() { return m_TomorrowTag; };
bool GetTomorrowTag() { return this->TomorrowTag; };
/**
* Try to run tests of the project
@ -93,8 +93,8 @@ public:
///! what is the configuraiton type, e.g. Debug, Release etc.
std::string GetConfigType();
double GetTimeOut() { return m_TimeOut; }
void SetTimeOut(double t) { m_TimeOut = t; }
double GetTimeOut() { return this->TimeOut; }
void SetTimeOut(double t) { this->TimeOut = t; }
/**
* Check if CTest file exists
@ -111,7 +111,7 @@ public:
* Set the cmake test mode (experimental, nightly, continuous).
*/
void SetTestModel(int mode);
int GetTestModel() { return m_TestModel; };
int GetTestModel() { return this->TestModel; };
std::string GetTestModelString();
static int GetTestModelFromString(const char* str);
@ -198,8 +198,8 @@ public:
std::string GetShortPathToFile(const char* fname);
//! Get the path to CTest
const char* GetCTestExecutable() { return m_CTestSelf.c_str(); }
const char* GetCMakeExecutable() { return m_CMakeSelf.c_str(); }
const char* GetCTestExecutable() { return this->CTestSelf.c_str(); }
const char* GetCMakeExecutable() { return this->CMakeSelf.c_str(); }
enum {
EXPERIMENTAL,
@ -252,7 +252,7 @@ public:
// script, this should be true.
void SetSuppressUpdatingCTestConfiguration(bool val)
{
m_SuppressUpdatingCTestConfiguration = val;
this->SuppressUpdatingCTestConfiguration = val;
}
//! Add overwrite to ctest configuration.
@ -284,29 +284,29 @@ public:
void Log(int logType, const char* file, int line, const char* msg);
//! Get the version of dart server
int GetDartVersion() { return m_DartVersion; }
int GetDartVersion() { return this->DartVersion; }
//! Add file to be submitted
void AddSubmitFile(const char* name);
SetOfStrings* GetSubmitFiles() { return &m_SubmitFiles; }
SetOfStrings* GetSubmitFiles() { return &this->SubmitFiles; }
private:
std::string m_ConfigType;
bool m_Verbose;
bool m_ExtraVerbose;
bool m_ProduceXML;
std::string ConfigType;
bool Verbose;
bool ExtraVerbose;
bool ProduceXML;
bool m_ForceNewCTestProcess;
bool ForceNewCTestProcess;
bool m_RunConfigurationScript;
bool RunConfigurationScript;
int GenerateNotesFile(const char* files);
// these are helper classes
typedef std::map<cmStdString,cmCTestGenericHandler*> t_TestingHandlers;
t_TestingHandlers m_TestingHandlers;
t_TestingHandlers TestingHandlers;
bool m_ShowOnly;
bool ShowOnly;
enum {
FIRST_TEST = 0,
@ -326,35 +326,35 @@ private:
//! Map of configuration properties
typedef std::map<cmStdString, cmStdString> CTestConfigurationMap;
std::string m_CTestConfigFile;
CTestConfigurationMap m_CTestConfiguration;
CTestConfigurationMap m_CTestConfigurationOverwrites;
int m_Tests[LAST_TEST];
std::string CTestConfigFile;
CTestConfigurationMap CTestConfiguration;
CTestConfigurationMap CTestConfigurationOverwrites;
int Tests[LAST_TEST];
std::string m_CurrentTag;
bool m_TomorrowTag;
std::string CurrentTag;
bool TomorrowTag;
int m_TestModel;
int TestModel;
double m_TimeOut;
double TimeOut;
int m_CompatibilityMode;
int CompatibilityMode;
// information for the --build-and-test options
std::string m_CMakeSelf;
std::string m_CTestSelf;
std::string m_BinaryDir;
std::string CMakeSelf;
std::string CTestSelf;
std::string BinaryDir;
std::string m_NotesFiles;
std::string NotesFiles;
int ReadCustomConfigurationFileTree(const char* dir);
bool m_InteractiveDebugMode;
bool InteractiveDebugMode;
bool m_ShortDateFormat;
bool ShortDateFormat;
bool m_CompressXMLFiles;
bool CompressXMLFiles;
void BlockTestErrorDiagnostics();
@ -373,20 +373,20 @@ private:
bool CheckArgument(const std::string& arg, const char* varg1,
const char* varg2 = 0);
bool m_SuppressUpdatingCTestConfiguration;
bool SuppressUpdatingCTestConfiguration;
bool m_Debug;
bool m_ShowLineNumbers;
bool m_Quiet;
bool Debug;
bool ShowLineNumbers;
bool Quiet;
int m_DartVersion;
int DartVersion;
std::set<cmStdString> m_SubmitFiles;
std::set<cmStdString> SubmitFiles;
int m_SubmitIndex;
int SubmitIndex;
cmGeneratedFileStream* m_OutputLogFile;
int m_OutputLogFileLastTag;
cmGeneratedFileStream* OutputLogFile;
int OutputLogFileLastTag;
};
class cmCTestLogWrite

View File

@ -183,7 +183,7 @@ bool cmCacheManager::LoadCache(const char* path,
// clear the old cache, if we are reading in internal values
if ( internal )
{
m_Cache.clear();
this->Cache.clear();
}
if(!cmSystemTools::FileExists(cacheFile.c_str()))
{
@ -220,7 +220,7 @@ bool cmCacheManager::LoadCache(const char* path,
}
while(realbuffer[0] == '/' && realbuffer[1] == '/')
{
e.m_Properties["HELPSTRING"] += &realbuffer[2];
e.Properties["HELPSTRING"] += &realbuffer[2];
cmSystemTools::GetLineFromStream(fin, buffer);
realbuffer = buffer.c_str();
if(!fin)
@ -228,7 +228,7 @@ bool cmCacheManager::LoadCache(const char* path,
continue;
}
}
if(cmCacheManager::ParseEntry(realbuffer, entryKey, e.m_Value, e.m_Type))
if(cmCacheManager::ParseEntry(realbuffer, entryKey, e.Value, e.Type))
{
if ( excludes.find(entryKey) == excludes.end() )
{
@ -236,7 +236,7 @@ bool cmCacheManager::LoadCache(const char* path,
// If the entry is not internal to the cache being loaded
// or if it is in the list of internal entries to be
// imported, load it.
if ( internal || (e.m_Type != INTERNAL) ||
if ( internal || (e.Type != INTERNAL) ||
(includes.find(entryKey) != includes.end()) )
{
// If we are loading the cache from another project,
@ -244,28 +244,28 @@ bool cmCacheManager::LoadCache(const char* path,
// not visible in the gui
if (!internal)
{
e.m_Type = INTERNAL;
e.m_Properties["HELPSTRING"] = "DO NOT EDIT, ";
e.m_Properties["HELPSTRING"] += entryKey;
e.m_Properties["HELPSTRING"] += " loaded from external file. "
e.Type = INTERNAL;
e.Properties["HELPSTRING"] = "DO NOT EDIT, ";
e.Properties["HELPSTRING"] += entryKey;
e.Properties["HELPSTRING"] += " loaded from external file. "
"To change this value edit this file: ";
e.m_Properties["HELPSTRING"] += path;
e.m_Properties["HELPSTRING"] += "/CMakeCache.txt" ;
e.Properties["HELPSTRING"] += path;
e.Properties["HELPSTRING"] += "/CMakeCache.txt" ;
}
if ( e.m_Type == cmCacheManager::INTERNAL &&
if ( e.Type == cmCacheManager::INTERNAL &&
(entryKey.size() > strlen("-ADVANCED")) &&
strcmp(entryKey.c_str() + (entryKey.size() -
strlen("-ADVANCED")), "-ADVANCED") == 0 )
{
std::string value = e.m_Value;
std::string akey
= entryKey.substr(0, (entryKey.size() - strlen("-ADVANCED")));
cmCacheManager::CacheIterator it
= this->GetCacheIterator(akey.c_str());
std::string value = e.Value;
std::string akey =
entryKey.substr(0, (entryKey.size() - strlen("-ADVANCED")));
cmCacheManager::CacheIterator it =
this->GetCacheIterator(akey.c_str());
if ( it.IsAtEnd() )
{
e.m_Type = cmCacheManager::UNINITIALIZED;
m_Cache[akey] = e;
e.Type = cmCacheManager::UNINITIALIZED;
this->Cache[akey] = e;
}
if (!it.Find(akey.c_str()))
{
@ -273,20 +273,20 @@ bool cmCacheManager::LoadCache(const char* path,
}
it.SetProperty("ADVANCED", value.c_str());
}
else if ( e.m_Type == cmCacheManager::INTERNAL &&
else if ( e.Type == cmCacheManager::INTERNAL &&
(entryKey.size() > strlen("-MODIFIED")) &&
strcmp(entryKey.c_str() + (entryKey.size() -
strlen("-MODIFIED")), "-MODIFIED") == 0 )
{
std::string value = e.m_Value;
std::string akey
= entryKey.substr(0, (entryKey.size() - strlen("-MODIFIED")));
cmCacheManager::CacheIterator it
= this->GetCacheIterator(akey.c_str());
std::string value = e.Value;
std::string akey =
entryKey.substr(0, (entryKey.size() - strlen("-MODIFIED")));
cmCacheManager::CacheIterator it =
this->GetCacheIterator(akey.c_str());
if ( it.IsAtEnd() )
{
e.m_Type = cmCacheManager::UNINITIALIZED;
m_Cache[akey] = e;
e.Type = cmCacheManager::UNINITIALIZED;
this->Cache[akey] = e;
}
if (!it.Find(akey.c_str()))
{
@ -296,8 +296,8 @@ bool cmCacheManager::LoadCache(const char* path,
}
else
{
e.m_Initialized = true;
m_Cache[entryKey] = e;
e.Initialized = true;
this->Cache[entryKey] = e;
}
}
}
@ -400,8 +400,8 @@ bool cmCacheManager::SaveCache(const char* path)
= this->GetCacheEntry("CMAKE_COMMAND");
if ( cmakeCacheEntry )
{
fout << "# It was generated by CMake: " << cmakeCacheEntry->m_Value
<< std::endl;
fout << "# It was generated by CMake: " <<
cmakeCacheEntry->Value << std::endl;
}
fout << "# You can edit this file to change values found and used by cmake."
@ -422,12 +422,12 @@ bool cmCacheManager::SaveCache(const char* path)
fout << "########################\n";
fout << "\n";
for( std::map<cmStdString, CacheEntry>::const_iterator i = m_Cache.begin();
i != m_Cache.end(); ++i)
for( std::map<cmStdString, CacheEntry>::const_iterator i = this->Cache.begin();
i != this->Cache.end(); ++i)
{
const CacheEntry& ce = (*i).second;
CacheEntryType t = ce.m_Type;
if(t == cmCacheManager::UNINITIALIZED || !ce.m_Initialized)
const CacheEntry& ce = (*i).second;
CacheEntryType t = ce.Type;
if(t == cmCacheManager::UNINITIALIZED || !ce.Initialized)
{
/*
// This should be added in, but is not for now.
@ -438,9 +438,9 @@ bool cmCacheManager::SaveCache(const char* path)
else if(t != INTERNAL)
{
// Format is key:type=value
std::map<cmStdString,cmStdString>::const_iterator it =
ce.m_Properties.find("HELPSTRING");
if ( it == ce.m_Properties.end() )
std::map<cmStdString,cmStdString>::const_iterator it =
ce.Properties.find("HELPSTRING");
if ( it == ce.Properties.end() )
{
cmCacheManager::OutputHelpString(fout, "Missing description");
}
@ -464,15 +464,15 @@ bool cmCacheManager::SaveCache(const char* path)
fout << key.c_str() << ":"
<< cmCacheManagerTypes[t] << "=";
// if value has trailing space or tab, enclose it in single quotes
if (ce.m_Value.size() &&
(ce.m_Value[ce.m_Value.size() - 1] == ' ' ||
ce.m_Value[ce.m_Value.size() - 1] == '\t'))
if (ce.Value.size() &&
(ce.Value[ce.Value.size() - 1] == ' ' ||
ce.Value[ce.Value.size() - 1] == '\t'))
{
fout << '\'' << ce.m_Value << '\'';
fout << '\'' << ce.Value << '\'';
}
else
{
fout << ce.m_Value;
fout << ce.Value;
}
fout << "\n\n";
}
@ -679,10 +679,10 @@ void cmCacheManager::OutputHelpString(std::ofstream& fout,
void cmCacheManager::RemoveCacheEntry(const char* key)
{
CacheEntryMap::iterator i = m_Cache.find(key);
if(i != m_Cache.end())
CacheEntryMap::iterator i = this->Cache.find(key);
if(i != this->Cache.end())
{
m_Cache.erase(i);
this->Cache.erase(i);
}
else
{
@ -693,8 +693,8 @@ void cmCacheManager::RemoveCacheEntry(const char* key)
cmCacheManager::CacheEntry *cmCacheManager::GetCacheEntry(const char* key)
{
CacheEntryMap::iterator i = m_Cache.find(key);
if(i != m_Cache.end())
CacheEntryMap::iterator i = this->Cache.find(key);
if(i != this->Cache.end())
{
return &i->second;
}
@ -709,11 +709,11 @@ cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(
const char* cmCacheManager::GetCacheValue(const char* key) const
{
CacheEntryMap::const_iterator i = m_Cache.find(key);
if(i != m_Cache.end() &&
i->second.m_Initialized)
CacheEntryMap::const_iterator i = this->Cache.find(key);
if(i != this->Cache.end() &&
i->second.Initialized)
{
return i->second.m_Value.c_str();
return i->second.Value.c_str();
}
return 0;
}
@ -723,13 +723,13 @@ void cmCacheManager::PrintCache(std::ostream& out) const
{
out << "=================================================" << std::endl;
out << "CMakeCache Contents:" << std::endl;
for(std::map<cmStdString, CacheEntry>::const_iterator i = m_Cache.begin();
i != m_Cache.end(); ++i)
for(std::map<cmStdString, CacheEntry>::const_iterator i = this->Cache.begin();
i != this->Cache.end(); ++i)
{
if((*i).second.m_Type != INTERNAL)
if((*i).second.Type != INTERNAL)
{
out << (*i).first.c_str() << " = " << (*i).second.m_Value.c_str()
<< std::endl;
out << (*i).first.c_str() << " = " << (*i).second.Value.c_str()
<< std::endl;
}
}
out << "\n\n";
@ -744,32 +744,32 @@ void cmCacheManager::AddCacheEntry(const char* key,
const char* helpString,
CacheEntryType type)
{
CacheEntry& e = m_Cache[key];
CacheEntry& e = this->Cache[key];
if ( value )
{
e.m_Value = value;
e.m_Initialized = true;
e.Value = value;
e.Initialized = true;
}
else
{
e.m_Value = "";
e.Value = "";
}
e.m_Type = type;
e.Type = type;
// make sure we only use unix style paths
if(type == FILEPATH || type == PATH)
{
cmSystemTools::ConvertToUnixSlashes(e.m_Value);
cmSystemTools::ConvertToUnixSlashes(e.Value);
}
if ( helpString )
{
e.m_Properties["HELPSTRING"] = helpString;
e.Properties["HELPSTRING"] = helpString;
}
else
{
e.m_Properties["HELPSTRING"]
= "(This variable does not exists and should not be used)";
e.Properties["HELPSTRING"] =
"(This variable does not exists and should not be used)";
}
m_Cache[key] = e;
this->Cache[key] = e;
}
void cmCacheManager::AddCacheEntry(const char* key, bool v,
@ -787,17 +787,17 @@ void cmCacheManager::AddCacheEntry(const char* key, bool v,
bool cmCacheManager::CacheIterator::IsAtEnd() const
{
return m_Position == m_Container.m_Cache.end();
return this->Position == this->Container.Cache.end();
}
void cmCacheManager::CacheIterator::Begin()
{
m_Position = m_Container.m_Cache.begin();
this->Position = this->Container.Cache.begin();
}
bool cmCacheManager::CacheIterator::Find(const char* key)
{
m_Position = m_Container.m_Cache.find(key);
this->Position = this->Container.Cache.find(key);
return !this->IsAtEnd();
}
@ -805,7 +805,7 @@ void cmCacheManager::CacheIterator::Next()
{
if (!this->IsAtEnd())
{
++m_Position;
++this->Position;
}
}
@ -818,12 +818,12 @@ void cmCacheManager::CacheIterator::SetValue(const char* value)
CacheEntry* entry = &this->GetEntry();
if ( value )
{
entry->m_Value = value;
entry->m_Initialized = true;
entry->Value = value;
entry->Initialized = true;
}
else
{
entry->m_Value = "";
entry->Value = "";
}
}
@ -843,9 +843,9 @@ const char* cmCacheManager::CacheIterator::GetProperty(
return 0;
}
const CacheEntry* ent = &this->GetEntry();
std::map<cmStdString,cmStdString>::const_iterator it =
ent->m_Properties.find(property);
if ( it == ent->m_Properties.end() )
std::map<cmStdString,cmStdString>::const_iterator it =
ent->Properties.find(property);
if ( it == ent->Properties.end() )
{
return 0;
}
@ -867,12 +867,13 @@ void cmCacheManager::CacheIterator::SetProperty(const char* p, const char* v)
return;
}
CacheEntry* ent = &this->GetEntry();
ent->m_Properties[p] = v;
ent->Properties[p] = v;
}
bool cmCacheManager::CacheIterator::GetValueAsBool() const
{
return cmSystemTools::IsOn(this->GetEntry().m_Value.c_str());
bool cmCacheManager::CacheIterator::GetValueAsBool() const
{
return cmSystemTools::IsOn(this->GetEntry().Value.c_str());
}
bool cmCacheManager::CacheIterator::GetPropertyAsBool(
@ -891,9 +892,9 @@ bool cmCacheManager::CacheIterator::GetPropertyAsBool(
return false;
}
const CacheEntry* ent = &this->GetEntry();
std::map<cmStdString,cmStdString>::const_iterator it =
ent->m_Properties.find(property);
if ( it == ent->m_Properties.end() )
std::map<cmStdString,cmStdString>::const_iterator it =
ent->Properties.find(property);
if ( it == ent->Properties.end() )
{
return false;
}
@ -916,7 +917,7 @@ void cmCacheManager::CacheIterator::SetProperty(const char* p, bool v)
return;
}
CacheEntry* ent = &this->GetEntry();
ent->m_Properties[p] = v ? "ON" : "OFF";
ent->Properties[p] = v ? "ON" : "OFF";
}
bool cmCacheManager::CacheIterator::PropertyExists(const char* property) const
@ -934,9 +935,9 @@ bool cmCacheManager::CacheIterator::PropertyExists(const char* property) const
return false;
}
const CacheEntry* ent = &this->GetEntry();
std::map<cmStdString,cmStdString>::const_iterator it =
ent->m_Properties.find(property);
if ( it == ent->m_Properties.end() )
std::map<cmStdString,cmStdString>::const_iterator it =
ent->Properties.find(property);
if ( it == ent->Properties.end() )
{
return false;
}

View File

@ -37,11 +37,11 @@ public:
private:
struct CacheEntry
{
std::string m_Value;
CacheEntryType m_Type;
std::map<cmStdString,cmStdString> m_Properties;
bool m_Initialized;
CacheEntry() : m_Value(""), m_Type(UNINITIALIZED), m_Initialized(false)
std::string Value;
CacheEntryType Type;
std::map<cmStdString,cmStdString> Properties;
bool Initialized;
CacheEntry() : Value(""), Type(UNINITIALIZED), Initialized(false)
{}
};
@ -54,23 +54,23 @@ public:
bool IsAtEnd() const;
void Next();
const char *GetName() const {
return m_Position->first.c_str(); }
return this->Position->first.c_str(); }
const char* GetProperty(const char*) const ;
bool GetPropertyAsBool(const char*) const ;
bool PropertyExists(const char*) const;
void SetProperty(const char* property, const char* value);
void SetProperty(const char* property, bool value);
const char* GetValue() const { return this->GetEntry().m_Value.c_str(); }
const char* GetValue() const { return this->GetEntry().Value.c_str(); }
bool GetValueAsBool() const;
void SetValue(const char*);
CacheEntryType GetType() const { return this->GetEntry().m_Type; }
bool Initialized() { return this->GetEntry().m_Initialized; }
cmCacheManager &m_Container;
std::map<cmStdString, CacheEntry>::iterator m_Position;
CacheIterator(cmCacheManager &cm) : m_Container(cm) {
CacheEntryType GetType() const { return this->GetEntry().Type; }
bool Initialized() { return this->GetEntry().Initialized; }
cmCacheManager &Container;
std::map<cmStdString, CacheEntry>::iterator Position;
CacheIterator(cmCacheManager &cm) : Container(cm) {
this->Begin();
}
CacheIterator(cmCacheManager &cm, const char* key) : m_Container(cm)
CacheIterator(cmCacheManager &cm, const char* key) : Container(cm)
{
if ( key )
{
@ -78,8 +78,8 @@ public:
}
}
private:
CacheEntry const& GetEntry() const { return m_Position->second; }
CacheEntry& GetEntry() { return m_Position->second; }
CacheEntry const& GetEntry() const { return this->Position->second; }
CacheEntry& GetEntry() { return this->Position->second; }
};
///! return an iterator to iterate through the cache map
@ -126,7 +126,7 @@ public:
///! Get the number of entries in the cache
int GetSize() {
return static_cast<int>(m_Cache.size()); }
return static_cast<int>(this->Cache.size()); }
///! Break up a line like VAR:type="value" into var, type and value
static bool ParseEntry(const char* entry,
@ -158,7 +158,7 @@ private:
typedef std::map<cmStdString, CacheEntry> CacheEntryMap;
static void OutputHelpString(std::ofstream& fout,
const std::string& helpString);
CacheEntryMap m_Cache;
CacheEntryMap Cache;
// Only cmake and cmMakefile should be able to add cache values
// the commands should never use the cmCacheManager directly
friend class cmMakefile; // allow access to add cache values

View File

@ -40,7 +40,7 @@ public:
* Construct the command. By default it is enabled with no makefile.
*/
cmCommand()
{m_Makefile = 0; m_Enabled = true;}
{this->Makefile = 0; this->Enabled = true;}
/**
* Need virtual destructor to destroy real command type.
@ -51,8 +51,8 @@ public:
* Specify the makefile.
*/
void SetMakefile(cmMakefile*m)
{m_Makefile = m; }
cmMakefile* GetMakefile() { return m_Makefile; }
{this->Makefile = m; }
cmMakefile* GetMakefile() { return this->Makefile; }
/**
* This is called by the cmMakefile when the command is first
@ -62,7 +62,7 @@ public:
virtual bool InvokeInitialPass(const std::vector<cmListFileArgument>& args)
{
std::vector<std::string> expandedArguments;
m_Makefile->ExpandArguments(args, expandedArguments);
this->Makefile->ExpandArguments(args, expandedArguments);
return this->InitialPass(expandedArguments);
}
@ -120,37 +120,37 @@ public:
* Enable the command.
*/
void EnabledOn()
{m_Enabled = true;}
{this->Enabled = true;}
/**
* Disable the command.
*/
void EnabledOff()
{m_Enabled = false;}
{this->Enabled = false;}
/**
* Query whether the command is enabled.
*/
bool GetEnabled()
{return m_Enabled;}
{return this->Enabled;}
/**
* Disable or enable the command.
*/
void SetEnabled(bool enabled)
{m_Enabled = enabled;}
{this->Enabled = enabled;}
/**
* Return the last error string.
*/
const char* GetError()
{
if(m_Error.length() == 0)
if(this->Error.length() == 0)
{
m_Error = this->GetName();
m_Error += " unknown error.";
this->Error = this->GetName();
this->Error += " unknown error.";
}
return m_Error.c_str();
return this->Error.c_str();
}
/**
@ -158,17 +158,17 @@ public:
*/
void SetError(const char* e)
{
m_Error = this->GetName();
m_Error += " ";
m_Error += e;
this->Error = this->GetName();
this->Error += " ";
this->Error += e;
}
protected:
cmMakefile* m_Makefile;
cmMakefile* Makefile;
private:
bool m_Enabled;
std::string m_Error;
bool Enabled;
std::string Error;
};
#endif

View File

@ -829,7 +829,7 @@ YY_RULE_SETUP
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
yylvalp->str = yyextra->m_DCURLYVariable;
yylvalp->str = yyextra->DCURLYVariable;
return cal_DCURLY;
}
case 4:
@ -838,7 +838,7 @@ YY_RULE_SETUP
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
yylvalp->str = yyextra->m_RCURLYVariable;
yylvalp->str = yyextra->RCURLYVariable;
return cal_RCURLY;
}
case 5:
@ -847,7 +847,7 @@ YY_RULE_SETUP
{
//std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl;
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
yylvalp->str = yyextra->m_ATVariable;
yylvalp->str = yyextra->ATVariable;
return cal_AT;
}
case 6:
@ -882,7 +882,7 @@ YY_RULE_SETUP
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
yylvalp->str = yyextra->m_DOLLARVariable;
yylvalp->str = yyextra->DOLLARVariable;
return cal_DOLLAR;
}
case 10:
@ -890,7 +890,7 @@ YY_RULE_SETUP
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
yylvalp->str = yyextra->m_LCURLYVariable;
yylvalp->str = yyextra->LCURLYVariable;
return cal_LCURLY;
}
case 11:
@ -898,7 +898,7 @@ YY_RULE_SETUP
{
//yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext));
yylvalp->str = yyextra->m_BSLASHVariable;
yylvalp->str = yyextra->BSLASHVariable;
return cal_BSLASH;
}
case 12:
@ -1093,10 +1093,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
size_t num_to_read =
size_t nuto_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
while ( nuto_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
@ -1128,17 +1128,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
nuto_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
if ( nuto_read > YY_READ_BUF_SIZE )
nuto_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, num_to_read );
yyg->yy_n_chars, nuto_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@ -1539,7 +1539,7 @@ void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner)
*/
static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
int nuto_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@ -1548,14 +1548,14 @@ static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
nuto_alloc = 1;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
(nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
yyg->yy_buffer_stack_top = 0;
return;
}
@ -1565,15 +1565,15 @@ static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner)
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
nuto_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
}
}

View File

@ -25,18 +25,18 @@ int cmCommandArgument_yyparse( yyscan_t yyscanner );
//
cmCommandArgumentParserHelper::cmCommandArgumentParserHelper()
{
m_FileLine = -1;
m_FileName = 0;
this->FileLine = -1;
this->FileName = 0;
m_EmptyVariable[0] = 0;
strcpy(m_DCURLYVariable, "${");
strcpy(m_RCURLYVariable, "}");
strcpy(m_ATVariable, "@");
strcpy(m_DOLLARVariable, "$");
strcpy(m_LCURLYVariable, "{");
strcpy(m_BSLASHVariable, "\\");
this->EmptyVariable[0] = 0;
strcpy(this->DCURLYVariable, "${");
strcpy(this->RCURLYVariable, "}");
strcpy(this->ATVariable, "@");
strcpy(this->DOLLARVariable, "$");
strcpy(this->LCURLYVariable, "{");
strcpy(this->BSLASHVariable, "\\");
m_NoEscapeMode = false;
this->NoEscapeMode = false;
}
@ -47,19 +47,19 @@ cmCommandArgumentParserHelper::~cmCommandArgumentParserHelper()
void cmCommandArgumentParserHelper::SetLineFile(long line, const char* file)
{
m_FileLine = line;
m_FileName = file;
this->FileLine = line;
this->FileName = file;
}
char* cmCommandArgumentParserHelper::AddString(const char* str)
{
if ( !str || !*str )
{
return m_EmptyVariable;
return this->EmptyVariable;
}
char* stVal = new char[strlen(str)+1];
strcpy(stVal, str);
m_Variables.push_back(stVal);
this->Variables.push_back(stVal);
return stVal;
}
@ -74,7 +74,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, cons
char *ptr = getenv(var);
if (ptr)
{
if (m_EscapeQuotes)
if (this->EscapeQuotes)
{
return this->AddString(cmSystemTools::EscapeQuotes(ptr).c_str());
}
@ -83,7 +83,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, cons
return ptr;
}
}
return m_EmptyVariable;
return this->EmptyVariable;
}
cmSystemTools::Error("Key ", key, " is not used yet. For now only $ENV{..} is allowed");
return 0;
@ -91,18 +91,18 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, cons
char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
{
if(m_FileName && strcmp(var, "CMAKE_CURRENT_LIST_FILE") == 0)
if(this->FileName && strcmp(var, "CMAKE_CURRENT_LIST_FILE") == 0)
{
return this->AddString(m_FileName);
return this->AddString(this->FileName);
}
else if(m_FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0)
else if(this->FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0)
{
cmOStringStream ostr;
ostr << m_FileLine;
ostr << this->FileLine;
return this->AddString(ostr.str().c_str());
}
const char* value = m_Makefile->GetDefinition(var);
if (m_EscapeQuotes && value)
const char* value = this->Makefile->GetDefinition(var);
if (this->EscapeQuotes && value)
{
return this->AddString(cmSystemTools::EscapeQuotes(value).c_str());
}
@ -123,7 +123,7 @@ char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2)
char* out = new char [ len ];
strcpy(out, in1);
strcat(out, in2);
m_Variables.push_back(out);
this->Variables.push_back(out);
return out;
}
@ -142,13 +142,13 @@ void cmCommandArgumentParserHelper::AllocateParserType(cmCommandArgumentParserHe
pt->str = new char[ len + 1 ];
strncpy(pt->str, str, len);
pt->str[len] = 0;
m_Variables.push_back(pt->str);
this->Variables.push_back(pt->str);
// std::cout << (void*) pt->str << " " << pt->str << " JPAllocateParserType" << std::endl;
}
bool cmCommandArgumentParserHelper::HandleEscapeSymbol(cmCommandArgumentParserHelper::ParserType* pt, char symbol)
{
if ( m_NoEscapeMode )
if ( this->NoEscapeMode )
{
char buffer[3];
buffer[0] = '\\';
@ -207,7 +207,7 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
this->InputBufferPos = 0;
this->CurrentLine = 0;
m_Result = "";
this->Result = "";
yyscan_t yyscanner;
cmCommandArgument_yylex_init(&yyscanner);
@ -225,7 +225,7 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
if ( Verbose )
{
std::cerr << "Expanding [" << str << "] produced: [" << m_Result.c_str() << "]" << std::endl;
std::cerr << "Expanding [" << str << "] produced: [" << this->Result.c_str() << "]" << std::endl;
}
return 1;
}
@ -233,13 +233,13 @@ int cmCommandArgumentParserHelper::ParseString(const char* str, int verb)
void cmCommandArgumentParserHelper::CleanupParser()
{
std::vector<char*>::iterator sit;
for ( sit = m_Variables.begin();
sit != m_Variables.end();
for ( sit = this->Variables.begin();
sit != this->Variables.end();
++ sit )
{
delete [] *sit;
}
m_Variables.erase(m_Variables.begin(), m_Variables.end());
this->Variables.erase(this->Variables.begin(), this->Variables.end());
}
int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen)
@ -283,21 +283,21 @@ void cmCommandArgumentParserHelper::Error(const char* str)
}
std::cerr << "]" << std::endl;
*/
m_Error = ostr.str();
this->ErrorString = ostr.str();
}
void cmCommandArgumentParserHelper::SetMakefile(const cmMakefile* mf)
{
m_Makefile = mf;
this->Makefile = mf;
}
void cmCommandArgumentParserHelper::SetResult(const char* value)
{
if ( !value )
{
m_Result = "";
this->Result = "";
return;
}
m_Result = value;
this->Result = value;
}

View File

@ -63,21 +63,20 @@ public:
void SetMakefile(const cmMakefile* mf);
std::string& GetResult() { return m_Result; }
std::string& GetResult() { return this->Result; }
void SetLineFile(long line, const char* file);
void SetEscapeQuotes(bool b) { m_EscapeQuotes = b; }
void SetNoEscapeMode(bool b) { m_NoEscapeMode = b; }
void SetEscapeQuotes(bool b) { this->EscapeQuotes = b; }
void SetNoEscapeMode(bool b) { this->NoEscapeMode = b; }
const char* GetError() { return m_Error.c_str(); }
char m_EmptyVariable[1];
char m_DCURLYVariable[3];
char m_RCURLYVariable[3];
char m_ATVariable[3];
char m_DOLLARVariable[3];
char m_LCURLYVariable[3];
char m_BSLASHVariable[3];
const char* GetError() { return this->ErrorString.c_str(); }
char EmptyVariable[1];
char DCURLYVariable[3];
char RCURLYVariable[3];
char ATVariable[3];
char DOLLARVariable[3];
char LCURLYVariable[3];
char BSLASHVariable[3];
private:
cmStdString::size_type InputBufferPos;
@ -94,14 +93,14 @@ private:
void CleanupParser();
std::vector<char*> m_Variables;
const cmMakefile* m_Makefile;
std::string m_Result;
const char* m_FileName;
long m_FileLine;
bool m_EscapeQuotes;
std::string m_Error;
bool m_NoEscapeMode;
std::vector<char*> Variables;
const cmMakefile* Makefile;
std::string Result;
const char* FileName;
long FileLine;
bool EscapeQuotes;
std::string ErrorString;
bool NoEscapeMode;
};
#endif

View File

@ -26,47 +26,47 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("called with incorrect number of arguments, expected 2");
return false;
}
m_InputFile = args[0];
m_OuputFile = args[1];
m_CopyOnly = false;
m_EscapeQuotes = false;
this->InputFile = args[0];
this->OuputFile = args[1];
this->CopyOnly = false;
this->EscapeQuotes = false;
// for CMake 2.0 and earlier CONFIGURE_FILE defaults to the FinalPass,
// after 2.0 it only does InitialPass
m_Immediate = false;
this->Immediate = false;
const char* versionValue
= m_Makefile->GetRequiredDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
= this->Makefile->GetRequiredDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
if (atof(versionValue) > 2.0)
{
m_Immediate = true;
this->Immediate = true;
}
m_AtOnly = false;
this->AtOnly = false;
for(unsigned int i=2;i < args.size();++i)
{
if(args[i] == "COPYONLY")
{
m_CopyOnly = true;
this->CopyOnly = true;
}
else if(args[i] == "ESCAPE_QUOTES")
{
m_EscapeQuotes = true;
this->EscapeQuotes = true;
}
else if(args[i] == "@ONLY")
{
m_AtOnly = true;
this->AtOnly = true;
}
else if(args[i] == "IMMEDIATE")
{
m_Immediate = true;
this->Immediate = true;
}
}
// If we were told to copy the file immediately, then do it on the
// first pass (now).
if(m_Immediate)
if(this->Immediate)
{
if ( !this->ConfigureFile() )
{
@ -80,7 +80,7 @@ bool cmConfigureFileCommand::InitialPass(std::vector<std::string> const& args)
void cmConfigureFileCommand::FinalPass()
{
if(!m_Immediate)
if(!this->Immediate)
{
this->ConfigureFile();
}
@ -88,18 +88,18 @@ void cmConfigureFileCommand::FinalPass()
int cmConfigureFileCommand::ConfigureFile()
{
std::string inFile = m_InputFile;
std::string inFile = this->InputFile;
if (!cmSystemTools::FileIsFullPath(inFile.c_str()))
{
inFile = m_Makefile->GetStartDirectory();
inFile = this->Makefile->GetStartDirectory();
inFile += "/";
inFile += m_InputFile;
inFile += this->InputFile;
}
return m_Makefile->ConfigureFile(inFile.c_str(),
m_OuputFile.c_str(),
m_CopyOnly,
m_AtOnly,
m_EscapeQuotes);
return this->Makefile->ConfigureFile(inFile.c_str(),
this->OuputFile.c_str(),
this->CopyOnly,
this->AtOnly,
this->EscapeQuotes);
}

View File

@ -81,12 +81,12 @@ public:
private:
int ConfigureFile();
std::string m_InputFile;
std::string m_OuputFile;
bool m_CopyOnly;
bool m_EscapeQuotes;
bool m_Immediate;
bool m_AtOnly;
std::string InputFile;
std::string OuputFile;
bool CopyOnly;
bool EscapeQuotes;
bool Immediate;
bool AtOnly;
};

View File

@ -77,13 +77,14 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args)
"You must specify a file extenion for the test driver file.");
return false;
}
std::string driver = m_Makefile->GetCurrentOutputDirectory();
std::string driver = this->Makefile->GetCurrentOutputDirectory();
driver += "/";
driver += *i;
++i;
std::string configFile =
m_Makefile->GetRequiredDefinition("CMAKE_ROOT");
this->Makefile->GetRequiredDefinition("CMAKE_ROOT");
configFile += "/Templates/TestDriver.cxx.in";
// Create the test driver file
@ -150,20 +151,20 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args)
}
if(extraInclude.size())
{
m_Makefile->AddDefinition("CMAKE_TESTDRIVER_EXTRA_INCLUDES",
extraInclude.c_str());
this->Makefile->AddDefinition("CMAKE_TESTDRIVER_EXTRA_INCLUDES",
extraInclude.c_str());
}
if(function.size())
{
m_Makefile->AddDefinition("CMAKE_TESTDRIVER_ARGVC_FUNCTION",
function.c_str());
this->Makefile->AddDefinition("CMAKE_TESTDRIVER_ARGVC_FUNCTION",
function.c_str());
}
m_Makefile->AddDefinition("CMAKE_FORWARD_DECLARE_TESTS",
this->Makefile->AddDefinition("CMAKE_FORWARD_DECLARE_TESTS",
forwardDeclareCode.c_str());
m_Makefile->AddDefinition("CMAKE_FUNCTION_TABLE_ENTIRES",
this->Makefile->AddDefinition("CMAKE_FUNCTION_TABLE_ENTIRES",
functionMapCode.c_str());
bool res = true;
if ( !m_Makefile->ConfigureFile(configFile.c_str(), driver.c_str(),
if ( !this->Makefile->ConfigureFile(configFile.c_str(), driver.c_str(),
false, true, false) )
{
res = false;
@ -175,10 +176,10 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args)
cfile.SetProperty("ABSTRACT","0");
cfile.SetName(cmSystemTools::GetFilenameWithoutExtension(args[1]).c_str(),
m_Makefile->GetCurrentOutputDirectory(),
this->Makefile->GetCurrentOutputDirectory(),
cmSystemTools::GetFilenameExtension(args[1]).c_str()+1,
false);
m_Makefile->AddSource(cfile);
this->Makefile->AddSource(cfile);
sourceListValue = args[1];
for(i = testsBegin; i != tests.end(); ++i)
@ -186,15 +187,15 @@ bool cmCreateTestSourceList::InitialPass(std::vector<std::string> const& args)
cmSourceFile icfile;
icfile.SetProperty("ABSTRACT","0");
icfile.SetName(i->c_str(),
m_Makefile->GetCurrentDirectory(),
m_Makefile->GetSourceExtensions(),
m_Makefile->GetHeaderExtensions());
m_Makefile->AddSource(icfile);
this->Makefile->GetCurrentDirectory(),
this->Makefile->GetSourceExtensions(),
this->Makefile->GetHeaderExtensions());
this->Makefile->AddSource(icfile);
sourceListValue += ";";
sourceListValue += *i;
}
m_Makefile->AddDefinition(sourceList, sourceListValue.c_str());
this->Makefile->AddDefinition(sourceList, sourceListValue.c_str());
return res;
}

View File

@ -19,65 +19,65 @@
//----------------------------------------------------------------------------
cmCustomCommand::cmCustomCommand()
{
m_Used = false;
this->Used = false;
}
//----------------------------------------------------------------------------
cmCustomCommand::cmCustomCommand(const cmCustomCommand& r):
m_Output(r.m_Output),
m_Depends(r.m_Depends),
m_CommandLines(r.m_CommandLines),
m_Comment(r.m_Comment),
m_WorkingDirectory(r.m_WorkingDirectory)
Output(r.Output),
Depends(r.Depends),
CommandLines(r.CommandLines),
Comment(r.Comment),
WorkingDirectory(r.WorkingDirectory)
{
m_Used = false;
this->Used = false;
}
//----------------------------------------------------------------------------
cmCustomCommand::cmCustomCommand(const char* output,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines,
const char* comment,
const char* comment,
const char* workingDirectory):
m_Output(output?output:""),
m_Depends(depends),
m_CommandLines(commandLines),
m_Comment(comment?comment:""),
m_WorkingDirectory(workingDirectory?workingDirectory:"")
Output(output?output:""),
Depends(depends),
CommandLines(commandLines),
Comment(comment?comment:""),
WorkingDirectory(workingDirectory?workingDirectory:"")
{
m_Used = false;
this->Used = false;
}
//----------------------------------------------------------------------------
const char* cmCustomCommand::GetOutput() const
{
return m_Output.c_str();
return this->Output.c_str();
}
//----------------------------------------------------------------------------
const char* cmCustomCommand::GetWorkingDirectory() const
{
if(m_WorkingDirectory.size() == 0)
if(this->WorkingDirectory.size() == 0)
{
return 0;
}
return m_WorkingDirectory.c_str();
return this->WorkingDirectory.c_str();
}
//----------------------------------------------------------------------------
const std::vector<std::string>& cmCustomCommand::GetDepends() const
{
return m_Depends;
return this->Depends;
}
//----------------------------------------------------------------------------
const cmCustomCommandLines& cmCustomCommand::GetCommandLines() const
{
return m_CommandLines;
return this->CommandLines;
}
//----------------------------------------------------------------------------
const char* cmCustomCommand::GetComment() const
{
return m_Comment.c_str();
return this->Comment.c_str();
}

View File

@ -54,16 +54,16 @@ public:
const char* GetComment() const;
/** set get the used status of the command */
void Used() { m_Used = true;};
bool IsUsed() { return m_Used;};
void SetUsed() { this->Used = true;};
bool IsUsed() { return this->Used;};
private:
std::string m_Output;
std::vector<std::string> m_Depends;
cmCustomCommandLines m_CommandLines;
std::string m_Comment;
std::string m_WorkingDirectory;
bool m_Used;
std::string Output;
std::vector<std::string> Depends;
cmCustomCommandLines CommandLines;
std::string Comment;
std::string WorkingDirectory;
bool Used;
};
#endif

View File

@ -22,18 +22,18 @@
#include <string.h>
//----------------------------------------------------------------------------
cmDepends::cmDepends(): m_Verbose(false), m_FileComparison(0),
m_MaxPath(cmSystemTools::GetMaximumFilePathLength()),
m_Dependee(new char[m_MaxPath]),
m_Depender(new char[m_MaxPath])
cmDepends::cmDepends(): Verbose(false), FileComparison(0),
MaxPath(cmSystemTools::GetMaximumFilePathLength()),
Dependee(new char[MaxPath]),
Depender(new char[MaxPath])
{
}
//----------------------------------------------------------------------------
cmDepends::~cmDepends()
{
delete [] m_Dependee;
delete [] m_Depender;
delete [] this->Dependee;
delete [] this->Depender;
}
//----------------------------------------------------------------------------
@ -48,12 +48,12 @@ void cmDepends::Check(const char *makeFile, const char *internalFile)
{
// Dependency checks must be done in proper working directory.
std::string oldcwd = ".";
if(m_CompileDirectory != ".")
if(this->CompileDirectory != ".")
{
// Get the CWD but do not call CollapseFullPath because
// we only need it to cd back, and the form does not matter
oldcwd = cmSystemTools::GetCurrentWorkingDirectory(false);
cmSystemTools::ChangeDirectory(m_CompileDirectory.c_str());
cmSystemTools::ChangeDirectory(this->CompileDirectory.c_str());
}
// Check whether dependencies must be regenerated.
@ -76,7 +76,7 @@ void cmDepends::Check(const char *makeFile, const char *internalFile)
void cmDepends::Clear(const char *file)
{
// Print verbose output.
if(m_Verbose)
if(this->Verbose)
{
cmOStringStream msg;
msg << "Clearing dependencies in \"" << file << "\"." << std::endl;
@ -103,21 +103,21 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends)
// or newer than the depender then dependencies should be
// regenerated.
bool okay = true;
while(internalDepends.getline(m_Dependee, m_MaxPath))
while(internalDepends.getline(this->Dependee, this->MaxPath))
{
if ( m_Dependee[0] == 0 || m_Dependee[0] == '#' || m_Dependee[0] == '\r' )
if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || this->Dependee[0] == '\r' )
{
continue;
}
size_t len = internalDepends.gcount()-1;
if ( m_Dependee[len-1] == '\r' )
if ( this->Dependee[len-1] == '\r' )
{
len --;
m_Dependee[len] = 0;
this->Dependee[len] = 0;
}
if ( m_Dependee[0] != ' ' )
if ( this->Dependee[0] != ' ' )
{
memcpy(m_Depender, m_Dependee, len+1);
memcpy(this->Depender, this->Dependee, len+1);
continue;
}
/*
@ -131,15 +131,15 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends)
// Dependencies must be regenerated if the dependee does not exist
// or if the depender exists and is older than the dependee.
bool regenerate = false;
const char* dependee = m_Dependee+1;
const char* depender = m_Depender;
const char* dependee = this->Dependee+1;
const char* depender = this->Depender;
if(!cmSystemTools::FileExists(dependee))
{
// The dependee does not exist.
regenerate = true;
// Print verbose output.
if(m_Verbose)
if(this->Verbose)
{
cmOStringStream msg;
msg << "Dependee \"" << dependee
@ -152,14 +152,14 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends)
{
// The dependee and depender both exist. Compare file times.
int result = 0;
if((!m_FileComparison->FileTimeCompare(depender, dependee,
if((!this->FileComparison->FileTimeCompare(depender, dependee,
&result) || result < 0))
{
// The depender is older than the dependee.
regenerate = true;
// Print verbose output.
if(m_Verbose)
if(this->Verbose)
{
cmOStringStream msg;
msg << "Dependee \"" << dependee

View File

@ -36,10 +36,10 @@ public:
cmDepends();
/** at what level will the compile be done from */
void SetCompileDirectory(const char *dir) {m_CompileDirectory = dir;};
void SetCompileDirectory(const char *dir) {this->CompileDirectory = dir;};
/** should this be verbose in its output */
void SetVerbose(bool verb) { m_Verbose = verb; }
void SetVerbose(bool verb) { this->Verbose = verb; }
/** Virtual destructor to cleanup subclasses properly. */
virtual ~cmDepends();
@ -55,7 +55,8 @@ public:
void Clear(const char *file);
/** Set the file comparison object */
void SetFileComparison(cmFileTimeComparison* fc) { m_FileComparison = fc; }
void SetFileComparison(cmFileTimeComparison* fc) {
this->FileComparison = fc; }
protected:
@ -70,16 +71,16 @@ protected:
virtual bool CheckDependencies(std::istream& internalDepends);
// The directory in which the build rule for the target file is executed.
std::string m_Directory;
std::string m_CompileDirectory;
std::string Directory;
std::string CompileDirectory;
// Flag for verbose output.
bool m_Verbose;
cmFileTimeComparison* m_FileComparison;
bool Verbose;
cmFileTimeComparison* FileComparison;
size_t m_MaxPath;
char* m_Dependee;
char* m_Depender;
size_t MaxPath;
char* Dependee;
char* Depender;
private:
cmDepends(cmDepends const&); // Purposely not implemented.

View File

@ -23,7 +23,7 @@
//----------------------------------------------------------------------------
cmDependsC::cmDependsC():
m_IncludePath(0), m_GeneratedFiles(0)
IncludePath(0), GeneratedFiles(0)
{
}
@ -33,12 +33,12 @@ cmDependsC::cmDependsC(std::vector<std::string> const& includes,
const char* scanRegex, const char* complainRegex,
std::set<cmStdString> const& generatedFiles,
const cmStdString& cacheFileName):
m_IncludePath(&includes),
m_IncludeRegexLine("^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)([\">])"),
m_IncludeRegexScan(scanRegex),
m_IncludeRegexComplain(complainRegex),
m_GeneratedFiles(&generatedFiles),
m_cacheFileName(cacheFileName)
IncludePath(&includes),
IncludeRegexLine("^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)([\">])"),
IncludeRegexScan(scanRegex),
IncludeRegexComplain(complainRegex),
GeneratedFiles(&generatedFiles),
cacheFileName(cacheFileName)
{
this->ReadCacheFile();
}
@ -48,9 +48,8 @@ cmDependsC::~cmDependsC()
{
this->WriteCacheFile();
for (std::map<cmStdString, cmIncludeLines*>::iterator it
= m_fileCache.begin();
it!=m_fileCache.end(); ++it)
for (std::map<cmStdString, cmIncludeLines*>::iterator it=
this->fileCache.begin(); it!=this->fileCache.end(); ++it)
{
delete it->second;
}
@ -71,7 +70,7 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
cmSystemTools::Error("Cannot scan dependencies without an object file.");
return false;
}
if(!m_IncludePath)
if(!this->IncludePath)
{
cmSystemTools::Error("Cannot scan dependencies without an include path.");
return false;
@ -81,16 +80,16 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
bool first = true;
UnscannedEntry root;
root.FileName = src;
m_Unscanned.push(root);
m_Encountered.clear();
m_Encountered.insert(src);
this->Unscanned.push(root);
this->Encountered.clear();
this->Encountered.insert(src);
std::set<cmStdString> dependencies;
std::set<cmStdString> scanned;
while(!m_Unscanned.empty())
while(!this->Unscanned.empty())
{
// Get the next file to scan.
UnscannedEntry current = m_Unscanned.front();
m_Unscanned.pop();
UnscannedEntry current = this->Unscanned.front();
this->Unscanned.pop();
// If not a full path, find the file in the include path.
std::string fullName;
@ -113,8 +112,8 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
}
else
{
for(std::vector<std::string>::const_iterator i = m_IncludePath->begin();
i != m_IncludePath->end(); ++i)
for(std::vector<std::string>::const_iterator i = this->IncludePath->begin();
i != this->IncludePath->end(); ++i)
{
// Construct the name of the file as if it were in the current
// include directory. Avoid using a leading "./".
@ -141,7 +140,7 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
// Complain if the file cannot be found and matches the complain
// regex.
if(fullName.empty() &&
m_IncludeRegexComplain.find(current.FileName.c_str()))
this->IncludeRegexComplain.find(current.FileName.c_str()))
{
cmSystemTools::Error("Cannot find file \"",
current.FileName.c_str(), "\".");
@ -155,20 +154,21 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
scanned.insert(fullName);
// Check whether this file is already in the cache
std::map<cmStdString, cmIncludeLines*>::iterator fileIt
= m_fileCache.find(fullName);
if (fileIt!=m_fileCache.end())
std::map<cmStdString, cmIncludeLines*>::iterator fileIt=
this->fileCache.find(fullName);
if (fileIt!=this->fileCache.end())
{
fileIt->second->m_Used=true;
fileIt->second->Used=true;
dependencies.insert(fullName);
for (std::vector<UnscannedEntry>::const_iterator incIt=
fileIt->second->m_UnscannedEntries.begin();
incIt!=fileIt->second->m_UnscannedEntries.end(); ++incIt)
fileIt->second->UnscannedEntries.begin();
incIt!=fileIt->second->UnscannedEntries.end(); ++incIt)
{
if (m_Encountered.find(incIt->FileName) == m_Encountered.end())
if (this->Encountered.find(incIt->FileName) ==
this->Encountered.end())
{
m_Encountered.insert(incIt->FileName);
m_Unscanned.push(*incIt);
this->Encountered.insert(incIt->FileName);
this->Unscanned.push(*incIt);
}
}
}
@ -212,11 +212,11 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj,
//----------------------------------------------------------------------------
void cmDependsC::ReadCacheFile()
{
if(m_cacheFileName.size() == 0)
if(this->cacheFileName.size() == 0)
{
return;
}
std::ifstream fin(m_cacheFileName.c_str());
std::ifstream fin(this->cacheFileName.c_str());
if(!fin)
{
return;
@ -240,13 +240,13 @@ void cmDependsC::ReadCacheFile()
haveFileName=true;
int newer=0;
cmFileTimeComparison comp;
bool res
= comp.FileTimeCompare(m_cacheFileName.c_str(), line.c_str(), &newer);
bool res=comp.FileTimeCompare(this->cacheFileName.c_str(),
line.c_str(), &newer);
if ((res==true) && (newer==1)) //cache is newer than the parsed file
{
cacheEntry=new cmIncludeLines;
m_fileCache[line]=cacheEntry;
this->fileCache[line]=cacheEntry;
}
}
else if (cacheEntry!=0)
@ -259,7 +259,7 @@ void cmDependsC::ReadCacheFile()
{
entry.QuotedLocation=line;
}
cacheEntry->m_UnscannedEntries.push_back(entry);
cacheEntry->UnscannedEntries.push_back(entry);
}
}
}
@ -268,27 +268,27 @@ void cmDependsC::ReadCacheFile()
//----------------------------------------------------------------------------
void cmDependsC::WriteCacheFile() const
{
if(m_cacheFileName.size() == 0)
if(this->cacheFileName.size() == 0)
{
return;
}
std::ofstream cacheOut(m_cacheFileName.c_str());
std::ofstream cacheOut(this->cacheFileName.c_str());
if(!cacheOut)
{
return;
}
for (std::map<cmStdString, cmIncludeLines*>::const_iterator fileIt
= m_fileCache.begin();
fileIt!=m_fileCache.end(); ++fileIt)
for (std::map<cmStdString, cmIncludeLines*>::const_iterator fileIt=
this->fileCache.begin();
fileIt!=this->fileCache.end(); ++fileIt)
{
if (fileIt->second->m_Used)
if (fileIt->second->Used)
{
cacheOut<<fileIt->first.c_str()<<std::endl;
for (std::vector<UnscannedEntry>::const_iterator
incIt=fileIt->second->m_UnscannedEntries.begin();
incIt!=fileIt->second->m_UnscannedEntries.end(); ++incIt)
incIt=fileIt->second->UnscannedEntries.begin();
incIt!=fileIt->second->UnscannedEntries.end(); ++incIt)
{
cacheOut<<incIt->FileName.c_str()<<std::endl;
if (incIt->QuotedLocation.empty())
@ -310,20 +310,20 @@ void cmDependsC::Scan(std::istream& is, const char* directory,
const cmStdString& fullName)
{
cmIncludeLines* newCacheEntry=new cmIncludeLines;
newCacheEntry->m_Used=true;
m_fileCache[fullName]=newCacheEntry;
newCacheEntry->Used=true;
this->fileCache[fullName]=newCacheEntry;
// Read one line at a time.
std::string line;
while(cmSystemTools::GetLineFromStream(is, line))
{
// Match include directives.
if(m_IncludeRegexLine.find(line.c_str()))
if(this->IncludeRegexLine.find(line.c_str()))
{
// Get the file being included.
UnscannedEntry entry;
entry.FileName = m_IncludeRegexLine.match(1);
if(m_IncludeRegexLine.match(2) == "\"" &&
entry.FileName = this->IncludeRegexLine.match(1);
if(this->IncludeRegexLine.match(2) == "\"" &&
!cmSystemTools::FileIsFullPath(entry.FileName.c_str()))
{
// This was a double-quoted include with a relative path. We
@ -341,13 +341,13 @@ void cmDependsC::Scan(std::istream& is, const char* directory,
// is included by double-quotes and the other by angle brackets.
// This kind of problem will be fixed when a more
// preprocessor-like implementation of this scanner is created.
if (m_IncludeRegexScan.find(entry.FileName.c_str()))
if (this->IncludeRegexScan.find(entry.FileName.c_str()))
{
newCacheEntry->m_UnscannedEntries.push_back(entry);
if(m_Encountered.find(entry.FileName) == m_Encountered.end())
newCacheEntry->UnscannedEntries.push_back(entry);
if(this->Encountered.find(entry.FileName) == this->Encountered.end())
{
m_Encountered.insert(entry.FileName);
m_Unscanned.push(entry);
this->Encountered.insert(entry.FileName);
this->Unscanned.push(entry);
}
}
}
@ -367,7 +367,7 @@ bool cmDependsC::FileExistsOrIsGenerated(const std::string& fname,
else if(cmSystemTools::FileIsFullPath(fname.c_str()))
{
// The generated file may have been listed with a relative path.
std::string dir = cmSystemTools::CollapseFullPath(m_Directory.c_str());
std::string dir = cmSystemTools::CollapseFullPath(this->Directory.c_str());
std::string rname =
cmSystemTools::RelativePath(dir.c_str(), fname.c_str());
if(this->FileIsGenerated(rname, scanned, dependencies))
@ -385,9 +385,9 @@ bool cmDependsC::FileIsGenerated(const std::string& fname,
std::set<cmStdString>& scanned,
std::set<cmStdString>& dependencies)
{
if(m_GeneratedFiles &&
std::set<cmStdString>::const_iterator(m_GeneratedFiles->find(fname)) !=
m_GeneratedFiles->end())
if(this->GeneratedFiles &&
std::set<cmStdString>::const_iterator(this->GeneratedFiles->find(fname)) !=
this->GeneratedFiles->end())
{
// If the file does not really exist yet pretend it has already
// been scanned. When it exists later then dependencies will be

View File

@ -60,18 +60,18 @@ protected:
std::set<cmStdString>& dependencies);
// The include file search path.
std::vector<std::string> const* m_IncludePath;
std::vector<std::string> const* IncludePath;
// Regular expression to identify C preprocessor include directives.
cmsys::RegularExpression m_IncludeRegexLine;
cmsys::RegularExpression IncludeRegexLine;
// Regular expressions to choose which include files to scan
// recursively and which to complain about not finding.
cmsys::RegularExpression m_IncludeRegexScan;
cmsys::RegularExpression m_IncludeRegexComplain;
cmsys::RegularExpression IncludeRegexScan;
cmsys::RegularExpression IncludeRegexComplain;
// Set of generated files available.
std::set<cmStdString> const* m_GeneratedFiles;
std::set<cmStdString> const* GeneratedFiles;
public:
// Data structures for dependency graph walk.
struct UnscannedEntry
@ -82,18 +82,18 @@ public:
struct cmIncludeLines
{
cmIncludeLines(): m_Used(false) {}
std::vector<UnscannedEntry> m_UnscannedEntries;
bool m_Used;
cmIncludeLines(): Used(false) {}
std::vector<UnscannedEntry> UnscannedEntries;
bool Used;
};
protected:
std::set<cmStdString> m_Encountered;
std::queue<UnscannedEntry> m_Unscanned;
t_CharBuffer m_Buffer;
std::set<cmStdString> Encountered;
std::queue<UnscannedEntry> Unscanned;
t_CharBuffer Buffer;
std::map<cmStdString, cmIncludeLines *> m_fileCache;
std::map<cmStdString, cmIncludeLines *> fileCache;
cmStdString m_cacheFileName;
cmStdString cacheFileName;
void WriteCacheFile() const;
void ReadCacheFile();

View File

@ -77,13 +77,13 @@ struct cmDependsFortranParser_s
//----------------------------------------------------------------------------
cmDependsFortran::cmDependsFortran():
m_IncludePath(0)
IncludePath(0)
{
}
//----------------------------------------------------------------------------
cmDependsFortran::cmDependsFortran(std::vector<std::string> const& includes):
m_IncludePath(&includes)
IncludePath(&includes)
{
}
@ -107,7 +107,7 @@ bool cmDependsFortran::WriteDependencies(const char *src, const char *obj,
cmSystemTools::Error("Cannot scan dependencies without an object file.");
return false;
}
if(!m_IncludePath)
if(!this->IncludePath)
{
cmSystemTools::Error("Cannot scan dependencies without an include path.");
return false;
@ -311,8 +311,8 @@ bool cmDependsFortran::FindIncludeFile(const char* dir,
}
// Search the include path for the file.
for(std::vector<std::string>::const_iterator i = m_IncludePath->begin();
i != m_IncludePath->end(); ++i)
for(std::vector<std::string>::const_iterator i = this->IncludePath->begin();
i != this->IncludePath->end(); ++i)
{
fullName = *i;
fullName += "/";

View File

@ -56,10 +56,10 @@ protected:
std::ostream& makeDepends, std::ostream& internalDepends);
// The source file from which to start scanning.
std::string m_SourceFile;
std::string SourceFile;
// The include file search path.
std::vector<std::string> const* m_IncludePath;
std::vector<std::string> const* IncludePath;
private:
cmDependsFortran(cmDependsFortran const&); // Purposely not implemented.

View File

@ -1398,10 +1398,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
size_t num_to_read =
size_t nuto_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
while ( nuto_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
@ -1433,17 +1433,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
nuto_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
if ( nuto_read > YY_READ_BUF_SIZE )
nuto_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, num_to_read );
yyg->yy_n_chars, nuto_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@ -1885,7 +1885,7 @@ void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner)
*/
static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
int nuto_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@ -1894,14 +1894,15 @@ static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
nuto_alloc = 1;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsFortran_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
(nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
memset(yyg->yy_buffer_stack, 0,
nuto_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = nuto_alloc;
yyg->yy_buffer_stack_top = 0;
return;
}
@ -1911,15 +1912,15 @@ static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner)
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
nuto_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsFortran_yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
}
}

View File

@ -1672,10 +1672,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
size_t num_to_read =
size_t nuto_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
while ( nuto_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
@ -1707,17 +1707,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
nuto_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
if ( nuto_read > YY_READ_BUF_SIZE )
nuto_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, num_to_read );
yyg->yy_n_chars, nuto_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@ -2118,7 +2118,7 @@ void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner)
*/
static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
int nuto_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@ -2127,14 +2127,14 @@ static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
nuto_alloc = 1;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
(nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
yyg->yy_buffer_stack_top = 0;
return;
}
@ -2144,15 +2144,15 @@ static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner)
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
nuto_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
}
}

View File

@ -36,7 +36,7 @@ public:
static cmDynamicLoaderCache* GetInstance();
private:
std::map<cmStdString, cmLibHandle> m_CacheMap;
std::map<cmStdString, cmLibHandle> CacheMap;
static cmDynamicLoaderCache* Instance;
};
@ -53,13 +53,13 @@ void cmDynamicLoaderCache::CacheFile(const char* path, const cmLibHandle& p)
{
this->FlushCache(path);
}
this->m_CacheMap[path] = p;
this->CacheMap[path] = p;
}
bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
{
std::map<cmStdString, cmLibHandle>::iterator it = m_CacheMap.find(path);
if ( it != m_CacheMap.end() )
std::map<cmStdString, cmLibHandle>::iterator it = this->CacheMap.find(path);
if ( it != this->CacheMap.end() )
{
p = it->second;
return true;
@ -69,12 +69,12 @@ bool cmDynamicLoaderCache::GetCacheFile(const char* path, cmLibHandle& p)
bool cmDynamicLoaderCache::FlushCache(const char* path)
{
std::map<cmStdString, cmLibHandle>::iterator it = m_CacheMap.find(path);
std::map<cmStdString, cmLibHandle>::iterator it = this->CacheMap.find(path);
bool ret = false;
if ( it != m_CacheMap.end() )
if ( it != this->CacheMap.end() )
{
cmDynamicLoader::CloseLibrary(it->second);
m_CacheMap.erase(it);
this->CacheMap.erase(it);
ret = true;
}
return ret;
@ -82,8 +82,8 @@ bool cmDynamicLoaderCache::FlushCache(const char* path)
void cmDynamicLoaderCache::FlushCache()
{
for ( std::map<cmStdString, cmLibHandle>::iterator it = m_CacheMap.begin();
it != m_CacheMap.end(); it++ )
for ( std::map<cmStdString, cmLibHandle>::iterator it = this->CacheMap.begin();
it != this->CacheMap.end(); it++ )
{
cmDynamicLoader::CloseLibrary(it->second);
}

View File

@ -24,7 +24,7 @@ bool cmEnableLanguageCommand::InitialPass(std::vector<std::string> const& args)
this->SetError("ENABLE_LANGUAGE called with incorrect number of arguments");
return false;
}
m_Makefile->EnableLanguage(args);
this->Makefile->EnableLanguage(args);
return true;
}

View File

@ -21,6 +21,6 @@
// been defined
bool cmEnableTestingCommand::InitialPass(std::vector<std::string> const&)
{
m_Makefile->AddDefinition("CMAKE_TESTING_ENABLED","1");
this->Makefile->AddDefinition("CMAKE_TESTING_ENABLED","1");
return true;
}

View File

@ -19,7 +19,7 @@
bool cmEndIfCommand::InitialPass(std::vector<std::string> const&)
{
const char* versionValue
= m_Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
= this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
if (!versionValue || (atof(versionValue) <= 1.4))
{
return true;

View File

@ -133,14 +133,14 @@ bool cmExecProgramCommand::InitialPass(std::vector<std::string> const& args)
}
std::string coutput = std::string(output, first, last-first+1);
m_Makefile->AddDefinition(output_variable.c_str(), coutput.c_str());
this->Makefile->AddDefinition(output_variable.c_str(), coutput.c_str());
}
if ( return_variable.size() > 0 )
{
char buffer[100];
sprintf(buffer, "%d", retVal);
m_Makefile->AddDefinition(return_variable.c_str(), buffer);
this->Makefile->AddDefinition(return_variable.c_str(), buffer);
}
return true;

View File

@ -288,11 +288,11 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args)
// Store the output obtained.
if(!output_variable.empty())
{
m_Makefile->AddDefinition(output_variable.c_str(), &*tempOutput.begin());
this->Makefile->AddDefinition(output_variable.c_str(), &*tempOutput.begin());
}
if(!merge_output && !error_variable.empty())
{
m_Makefile->AddDefinition(error_variable.c_str(), &*tempError.begin());
this->Makefile->AddDefinition(error_variable.c_str(), &*tempError.begin());
}
// Store the result of running the process.
@ -305,19 +305,19 @@ bool cmExecuteProcessCommand::InitialPass(std::vector<std::string> const& args)
int v = cmsysProcess_GetExitValue(cp);
char buf[100];
sprintf(buf, "%d", v);
m_Makefile->AddDefinition(result_variable.c_str(), buf);
this->Makefile->AddDefinition(result_variable.c_str(), buf);
}
break;
case cmsysProcess_State_Exception:
m_Makefile->AddDefinition(result_variable.c_str(),
this->Makefile->AddDefinition(result_variable.c_str(),
cmsysProcess_GetExceptionString(cp));
break;
case cmsysProcess_State_Error:
m_Makefile->AddDefinition(result_variable.c_str(),
this->Makefile->AddDefinition(result_variable.c_str(),
cmsysProcess_GetErrorString(cp));
break;
case cmsysProcess_State_Expired:
m_Makefile->AddDefinition(result_variable.c_str(),
this->Makefile->AddDefinition(result_variable.c_str(),
"Process terminated due to timeout");
break;
}

View File

@ -38,7 +38,7 @@ bool cmExportLibraryDependenciesCommand::InitialPass(std::vector<std::string> co
// store the arguments for the final pass
// also expand any CMake variables
m_Args = args;
this->Args = args;
return true;
}
@ -46,11 +46,11 @@ bool cmExportLibraryDependenciesCommand::InitialPass(std::vector<std::string> co
void cmExportLibraryDependenciesCommand::FinalPass()
{
// Create a full path filename for output
std::string fname = m_Args[0];
std::string fname = this->Args[0];
bool append = false;
if(m_Args.size() > 1)
if(this->Args.size() > 1)
{
if(m_Args[1] == "APPEND")
if(this->Args[1] == "APPEND")
{
append = true;
}
@ -79,7 +79,7 @@ void cmExportLibraryDependenciesCommand::FinalPass()
cmSystemTools::ReportLastSystemError("");
return;
}
cmake* cm = m_Makefile->GetCMakeInstance();
cmake* cm = this->Makefile->GetCMakeInstance();
cmGlobalGenerator* global = cm->GetGlobalGenerator();
std::vector<cmLocalGenerator *> locals;
global->GetLocalGenerators(locals);
@ -99,7 +99,7 @@ void cmExportLibraryDependenciesCommand::FinalPass()
{
libDepName = l->first;
libDepName += "_LIB_DEPENDS";
const char* def = m_Makefile->GetDefinition(libDepName.c_str());
const char* def = this->Makefile->GetDefinition(libDepName.c_str());
if(def)
{
fout << "SET(" << libDepName << " \"" << def << "\")\n";
@ -110,7 +110,7 @@ void cmExportLibraryDependenciesCommand::FinalPass()
{
libDepName = *d;
libDepName += "_LINK_TYPE";
defType = m_Makefile->GetDefinition(libDepName.c_str());
defType = this->Makefile->GetDefinition(libDepName.c_str());
libDepName = cmSystemTools::EscapeSpaces(libDepName.c_str());
if(defType)
{

View File

@ -79,7 +79,7 @@ public:
cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
private:
std::vector<std::string> m_Args;
std::vector<std::string> Args;
};

View File

@ -1059,10 +1059,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
else
{
size_t num_to_read =
size_t nuto_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
while ( nuto_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
@ -1094,17 +1094,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
nuto_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
number_to_move - 1;
}
if ( num_to_read > YY_READ_BUF_SIZE )
num_to_read = YY_READ_BUF_SIZE;
if ( nuto_read > YY_READ_BUF_SIZE )
nuto_read = YY_READ_BUF_SIZE;
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
yyg->yy_n_chars, num_to_read );
yyg->yy_n_chars, nuto_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
}
@ -1505,7 +1505,7 @@ void cmExpr_yypop_buffer_state (yyscan_t yyscanner)
*/
static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner)
{
int num_to_alloc;
int nuto_alloc;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!yyg->yy_buffer_stack) {
@ -1514,14 +1514,14 @@ static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1;
nuto_alloc = 1;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
(nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
yyg->yy_buffer_stack_top = 0;
return;
}
@ -1531,15 +1531,15 @@ static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner)
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
nuto_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyrealloc
(yyg->yy_buffer_stack,
num_to_alloc * sizeof(struct yy_buffer_state*)
nuto_alloc * sizeof(struct yy_buffer_state*)
, yyscanner);
/* zero only the new slots.*/
memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
yyg->yy_buffer_stack_max = num_to_alloc;
yyg->yy_buffer_stack_max = nuto_alloc;
}
}

View File

@ -25,8 +25,8 @@ int cmExpr_yyparse( yyscan_t yyscanner );
//
cmExprParserHelper::cmExprParserHelper()
{
m_FileLine = -1;
m_FileName = 0;
this->FileLine = -1;
this->FileName = 0;
}
@ -37,8 +37,8 @@ cmExprParserHelper::~cmExprParserHelper()
void cmExprParserHelper::SetLineFile(long line, const char* file)
{
m_FileLine = line;
m_FileName = file;
this->FileLine = line;
this->FileName = file;
}
int cmExprParserHelper::ParseString(const char* str, int verb)
@ -54,7 +54,7 @@ int cmExprParserHelper::ParseString(const char* str, int verb)
this->InputBufferPos = 0;
this->CurrentLine = 0;
m_Result = 0;
this->Result = 0;
yyscan_t yyscanner;
cmExpr_yylex_init(&yyscanner);
@ -72,7 +72,7 @@ int cmExprParserHelper::ParseString(const char* str, int verb)
if ( Verbose )
{
std::cerr << "Expanding [" << str << "] produced: [" << m_Result << "]" << std::endl;
std::cerr << "Expanding [" << str << "] produced: [" << this->Result << "]" << std::endl;
}
return 1;
}
@ -122,12 +122,12 @@ void cmExprParserHelper::Error(const char* str)
}
std::cerr << "]" << std::endl;
*/
m_Error = ostr.str();
this->ErrorString = ostr.str();
}
void cmExprParserHelper::SetResult(int value)
{
m_Result = value;
this->Result = value;
}

View File

@ -49,11 +49,11 @@ public:
void SetResult(int value);
int GetResult() { return m_Result; }
int GetResult() { return this->Result; }
void SetLineFile(long line, const char* file);
const char* GetError() { return m_Error.c_str(); }
const char* GetError() { return this->ErrorString.c_str(); }
private:
cmStdString::size_type InputBufferPos;
@ -67,10 +67,10 @@ private:
void CleanupParser();
int m_Result;
const char* m_FileName;
long m_FileLine;
std::string m_Error;
int Result;
const char* FileName;
long FileLine;
std::string ErrorString;
};
#endif

View File

@ -28,27 +28,27 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
}
// what is the current source dir
std::string cdir = m_Makefile->GetCurrentDirectory();
std::string cdir = this->Makefile->GetCurrentDirectory();
const char* fluid_exe =
m_Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE");
this->Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE");
// get parameter for the command
m_Target = args[0]; // Target that will use the generated files
this->Target = args[0]; // Target that will use the generated files
std::vector<std::string> newArgs;
m_Makefile->ExpandSourceListArguments(args,newArgs, 1);
this->Makefile->ExpandSourceListArguments(args,newArgs, 1);
// get the list of GUI files from which .cxx and .h will be generated
std::string outputDirectory = m_Makefile->GetCurrentOutputDirectory();
std::string outputDirectory = this->Makefile->GetCurrentOutputDirectory();
// Some of the generated files are *.h so the directory "GUI"
// where they are created have to be added to the include path
m_Makefile->AddIncludeDirectory( outputDirectory.c_str() );
this->Makefile->AddIncludeDirectory( outputDirectory.c_str() );
for(std::vector<std::string>::iterator i = (newArgs.begin() + 1);
i != newArgs.end(); i++)
{
cmSourceFile *curr = m_Makefile->GetSource(i->c_str());
cmSourceFile *curr = this->Makefile->GetSource(i->c_str());
// if we should use the source GUI
// to generate .cxx and .h files
if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
@ -82,24 +82,24 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
const char* no_main_dependency = 0;
const char* no_comment = 0;
const char* no_working_dir = 0;
m_Makefile->AddCustomCommandToOutput(cxxres.c_str(),
this->Makefile->AddCustomCommandToOutput(cxxres.c_str(),
depends, no_main_dependency,
commandLines, no_comment,
no_working_dir);
m_Makefile->AddCustomCommandToOutput(hname.c_str(),
this->Makefile->AddCustomCommandToOutput(hname.c_str(),
depends, no_main_dependency,
commandLines, no_comment,
no_working_dir);
cmSourceFile *sf = m_Makefile->GetSource(cxxres.c_str());
cmSourceFile *sf = this->Makefile->GetSource(cxxres.c_str());
sf->GetDepends().push_back(hname);
sf->GetDepends().push_back(origname);
m_GeneratedSourcesClasses.push_back(sf);
this->GeneratedSourcesClasses.push_back(sf);
}
}
// create the variable with the list of sources in it
size_t lastHeadersClass = m_GeneratedSourcesClasses.size();
size_t lastHeadersClass = this->GeneratedSourcesClasses.size();
std::string sourceListValue;
for(size_t classNum = 0; classNum < lastHeadersClass; classNum++)
{
@ -107,11 +107,11 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
{
sourceListValue += ";";
}
sourceListValue += m_GeneratedSourcesClasses[classNum]->GetFullPath();
sourceListValue += this->GeneratedSourcesClasses[classNum]->GetFullPath();
}
std::string varName = m_Target;
std::string varName = this->Target;
varName += "_FLTK_UI_SRCS";
m_Makefile->AddDefinition(varName.c_str(), sourceListValue.c_str());
this->Makefile->AddDefinition(varName.c_str(), sourceListValue.c_str());
return true;
}
@ -122,12 +122,12 @@ void cmFLTKWrapUICommand::FinalPass()
// didn't support that, so check and see if they added the files in and if
// they didn;t then print a warning and add then anyhow
std::vector<std::string> srcs =
m_Makefile->GetTargets()[m_Target].GetSourceLists();
this->Makefile->GetTargets()[this->Target].GetSourceLists();
bool found = false;
for (unsigned int i = 0; i < srcs.size(); ++i)
{
if (srcs[i] ==
m_GeneratedSourcesClasses[0]->GetFullPath())
this->GeneratedSourcesClasses[0]->GetFullPath())
{
found = true;
break;
@ -137,16 +137,16 @@ void cmFLTKWrapUICommand::FinalPass()
{
std::string msg = "In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of source files that should be added to your executable or library. It appears that you have not added these source files to your target. You should change your CMakeLists.txt file to directly add the generated files to the target. For example FTLK_WRAP_UI(foo src1 src2 src3) will create a variable named foo_FLTK_UI_SRCS that contains the list of sources to add to your target when you call ADD_LIBRARY or ADD_EXECUTABLE. For now CMake 2.2 will add the sources to your target for you as was done in CMake 2.0 and earlier. In the future this may become an error. ";
msg += "The problem was found while processing the source directory: ";
msg += m_Makefile->GetStartDirectory();
msg += this->Makefile->GetStartDirectory();
cmSystemTools::Message(msg.c_str(),"Warning");
// first we add the rules for all the .fl to .h and .cxx files
size_t lastHeadersClass = m_GeneratedSourcesClasses.size();
size_t lastHeadersClass = this->GeneratedSourcesClasses.size();
// Generate code for all the .fl files
for(size_t classNum = 0; classNum < lastHeadersClass; classNum++)
{
m_Makefile->GetTargets()[m_Target].GetSourceFiles().push_back(
m_GeneratedSourcesClasses[classNum]);
this->Makefile->GetTargets()[this->Target].GetSourceFiles().push_back(
this->GeneratedSourcesClasses[classNum]);
}
}
}

View File

@ -83,13 +83,13 @@ private:
/**
* List of produced files.
*/
std::vector<cmSourceFile *> m_GeneratedSourcesClasses;
std::vector<cmSourceFile *> GeneratedSourcesClasses;
/**
* List of Fluid files that provide the source
* generating .cxx and .h files
*/
std::string m_Target;
std::string Target;
};

View File

@ -93,7 +93,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
std::string fileName = *i;
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
{
fileName = m_Makefile->GetCurrentDirectory();
fileName = this->Makefile->GetCurrentDirectory();
fileName += "/" + *i;
}
@ -143,7 +143,7 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
file << message;
file.close();
cmSystemTools::SetPermissions(fileName.c_str(), mode);
m_Makefile->AddWrittenFile(fileName.c_str());
this->Makefile->AddWrittenFile(fileName.c_str());
return true;
}
@ -159,7 +159,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
std::string fileName = args[1];
if ( !cmsys::SystemTools::FileIsFullPath(args[1].c_str()) )
{
fileName = m_Makefile->GetCurrentDirectory();
fileName = this->Makefile->GetCurrentDirectory();
fileName += "/" + args[1];
}
@ -185,7 +185,7 @@ bool cmFileCommand::HandleReadCommand(std::vector<std::string> const& args)
output += "\n";
}
}
m_Makefile->AddDefinition(variable.c_str(), output.c_str());
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
return true;
}
@ -213,7 +213,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
{
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
{
std::string expr = m_Makefile->GetCurrentDirectory();
std::string expr = this->Makefile->GetCurrentDirectory();
// Handle script mode
if ( expr.size() > 0 )
{
@ -241,7 +241,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
first = false;
}
}
m_Makefile->AddDefinition(variable.c_str(), output.c_str());
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
return true;
}
@ -265,7 +265,7 @@ bool cmFileCommand::HandleMakeDirectoryCommand(
const std::string* cdir = &(*i);
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
{
expr = m_Makefile->GetCurrentDirectory();
expr = this->Makefile->GetCurrentDirectory();
expr += "/" + *i;
cdir = &expr;
}
@ -292,7 +292,7 @@ bool cmFileCommand::HandleInstallCommand(
std::string rename = "";
std::string destination = "";
std::string stype = "FILES";
const char* build_type = m_Makefile->GetDefinition("BUILD_TYPE");
const char* build_type = this->Makefile->GetDefinition("BUILD_TYPE");
if ( build_type && strcmp(build_type, ".") == 0 )
{
build_type = 0;
@ -621,7 +621,7 @@ bool cmFileCommand::HandleInstallCommand(
// Get the current manifest.
const char* manifest_files =
m_Makefile->GetDefinition("CMAKE_INSTALL_MANIFEST_FILES");
this->Makefile->GetDefinition("CMAKE_INSTALL_MANIFEST_FILES");
std::string smanifest_files;
if ( manifest_files )
{
@ -755,7 +755,7 @@ bool cmFileCommand::HandleInstallCommand(
// We will install this file. Display the information.
message = "Installing ";
message += toFile.c_str();
m_Makefile->DisplayStatus(message.c_str(), -1);
this->Makefile->DisplayStatus(message.c_str(), -1);
// If no permissions were already given use the permissions of
// the file being copied.
@ -830,7 +830,7 @@ bool cmFileCommand::HandleInstallCommand(
}
// Save the updated install manifest.
m_Makefile->AddDefinition("CMAKE_INSTALL_MANIFEST_FILES",
this->Makefile->AddDefinition("CMAKE_INSTALL_MANIFEST_FILES",
smanifest_files.c_str());
return true;
@ -864,7 +864,7 @@ bool cmFileCommand::HandleRelativePathCommand(
}
std::string res = cmSystemTools::RelativePath(directoryName.c_str(), fileName.c_str());
m_Makefile->AddDefinition(outVar.c_str(),
this->Makefile->AddDefinition(outVar.c_str(),
res.c_str());
return true;
}
@ -915,6 +915,6 @@ bool cmFileCommand::HandleSystemPathCommand(std::vector<std::string>
value += *j;
value += ";";
}
m_Makefile->AddDefinition(var, value.c_str());
this->Makefile->AddDefinition(var, value.c_str());
return true;
}

View File

@ -106,19 +106,19 @@ bool cmFileTimeComparisonInternal::Stat(const char* fname,
//----------------------------------------------------------------------------
cmFileTimeComparison::cmFileTimeComparison()
{
m_Internals = new cmFileTimeComparisonInternal;
this->Internals = new cmFileTimeComparisonInternal;
}
//----------------------------------------------------------------------------
cmFileTimeComparison::~cmFileTimeComparison()
{
delete m_Internals;
delete this->Internals;
}
//----------------------------------------------------------------------------
bool cmFileTimeComparison::FileTimeCompare(const char* f1, const char* f2, int* result)
{
return m_Internals->FileTimeCompare(f1, f2, result);
return this->Internals->FileTimeCompare(f1, f2, result);
}
//----------------------------------------------------------------------------

View File

@ -42,7 +42,7 @@ public:
protected:
cmFileTimeComparisonInternal* m_Internals;
cmFileTimeComparisonInternal* Internals;
};

View File

@ -297,7 +297,8 @@ void cmFindBase::AddCMakeVairables()
{
if(this->SearchFrameworkFirst || this->SearchFrameworkOnly)
{
if(const char* path = m_Makefile->GetDefinition("CMAKE_FRAMEWORK_PATH"))
if(const char* path =
this->Makefile->GetDefinition("CMAKE_FRAMEWORK_PATH"))
{
cmSystemTools::ExpandListArgument(path, this->SearchPaths);
}
@ -305,13 +306,14 @@ void cmFindBase::AddCMakeVairables()
std::string var = "CMAKE_";
var += this->CMakePathName;
var += "_PATH";
if(const char* path = m_Makefile->GetDefinition(var.c_str()))
if(const char* path = this->Makefile->GetDefinition(var.c_str()))
{
cmSystemTools::ExpandListArgument(path, this->SearchPaths);
}
if(this->SearchFrameworkLast)
{
if(const char* path = m_Makefile->GetDefinition("CMAKE_FRAMEWORK_PATH"))
if(const char* path =
this->Makefile->GetDefinition("CMAKE_FRAMEWORK_PATH"))
{
cmSystemTools::ExpandListArgument(path, this->SearchPaths);
}
@ -333,7 +335,7 @@ void cmFindBase::AddCMakeSystemVariables()
{
if(this->SearchFrameworkFirst || this->SearchFrameworkOnly)
{
if(const char* path = m_Makefile->GetDefinition("CMAKE_SYSTEM_FRAMEWORK_PATH"))
if(const char* path = this->Makefile->GetDefinition("CMAKE_SYSTEM_FRAMEWORK_PATH"))
{
cmSystemTools::ExpandListArgument(path, this->SearchPaths);
}
@ -341,13 +343,13 @@ void cmFindBase::AddCMakeSystemVariables()
std::string var = "CMAKE_SYSTEM_";
var += this->CMakePathName;
var += "_PATH";
if(const char* path = m_Makefile->GetDefinition(var.c_str()))
if(const char* path = this->Makefile->GetDefinition(var.c_str()))
{
cmSystemTools::ExpandListArgument(path, this->SearchPaths);
}
if(this->SearchFrameworkLast)
{
if(const char* path = m_Makefile->GetDefinition("CMAKE_SYSTEM_FRAMEWORK_PATH"))
if(const char* path = this->Makefile->GetDefinition("CMAKE_SYSTEM_FRAMEWORK_PATH"))
{
cmSystemTools::ExpandListArgument(path, this->SearchPaths);
}
@ -426,7 +428,7 @@ void cmFindBase::PrintFindStuff()
bool cmFindBase::CheckForVariableInCache()
{
const char* cacheValue
= m_Makefile->GetDefinition(this->VariableName.c_str());
= this->Makefile->GetDefinition(this->VariableName.c_str());
if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue))
{
return true;
@ -434,7 +436,7 @@ bool cmFindBase::CheckForVariableInCache()
if(cacheValue)
{
cmCacheManager::CacheIterator it =
m_Makefile->GetCacheManager()->GetCacheIterator(this->VariableName.c_str());
this->Makefile->GetCacheManager()->GetCacheIterator(this->VariableName.c_str());
if(!it.IsAtEnd())
{
const char* hs = it.GetProperty("HELPSTRING");

View File

@ -62,29 +62,29 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
library = this->FindLibrary(i->c_str());
if(library != "")
{
m_Makefile->AddCacheDefinition(this->VariableName.c_str(),
library.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
library.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
return true;
}
}
std::string notfound = this->VariableName + "-NOTFOUND";
m_Makefile->AddCacheDefinition(this->VariableName.c_str(),
notfound.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
notfound.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
return true;
}
void cmFindLibraryCommand::AddLib64Paths()
{
if(!m_Makefile->GetLocalGenerator()->GetGlobalGenerator()->GetLanguageEnabled("C"))
if(!this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->GetLanguageEnabled("C"))
{
return;
}
std::string voidsize = m_Makefile->GetRequiredDefinition("CMAKE_SIZEOF_VOID_P");
std::string voidsize = this->Makefile->GetRequiredDefinition("CMAKE_SIZEOF_VOID_P");
int size = atoi(voidsize.c_str());
std::vector<std::string> path64;
if(size != 8)
@ -131,7 +131,7 @@ std::string cmFindLibraryCommand::FindLibrary(const char* name)
{
bool supportFrameworks = false;
bool onlyFrameworks = false;
std::string ff = m_Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");
std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");
if(ff == "FIRST" || ff == "LAST")
{
supportFrameworks = true;
@ -143,9 +143,9 @@ std::string cmFindLibraryCommand::FindLibrary(const char* name)
}
const char* prefixes_list =
m_Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_PREFIXES");
this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_PREFIXES");
const char* suffixes_list =
m_Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_SUFFIXES");
this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_SUFFIXES");
std::vector<std::string> prefixes;
std::vector<std::string> suffixes;
cmSystemTools::ExpandListArgument(prefixes_list, prefixes, true);

View File

@ -78,7 +78,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
while (++i < args.size() && args[i] != "QUIET")
{
std::string req_var = Name + "_FIND_REQUIRED_" + args[i];
m_Makefile->AddDefinition(req_var.c_str(), "1");
this->Makefile->AddDefinition(req_var.c_str(), "1");
}
}
else
@ -118,7 +118,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
if(!(upperDir == this->Variable))
{
const char* versionValue =
m_Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
if(atof(versionValue) < 1.7)
{
needCompatibility = true;
@ -126,16 +126,16 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
}
// Try to find the config file.
const char* def = m_Makefile->GetDefinition(this->Variable.c_str());
const char* def = this->Makefile->GetDefinition(this->Variable.c_str());
if(needCompatibility && cmSystemTools::IsOff(def))
{
// Use the setting of the old name of the variable to provide the
// value of the new.
const char* oldDef = m_Makefile->GetDefinition(upperDir.c_str());
const char* oldDef = this->Makefile->GetDefinition(upperDir.c_str());
if(!cmSystemTools::IsOff(oldDef))
{
m_Makefile->AddDefinition(this->Variable.c_str(), oldDef);
def = m_Makefile->GetDefinition(this->Variable.c_str());
this->Makefile->AddDefinition(this->Variable.c_str(), oldDef);
def = this->Makefile->GetDefinition(this->Variable.c_str());
}
}
if(cmSystemTools::IsOff(def))
@ -149,7 +149,7 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
// If the config file was found, load it.
bool result = true;
bool found = false;
def = m_Makefile->GetDefinition(this->Variable.c_str());
def = this->Makefile->GetDefinition(this->Variable.c_str());
if(!cmSystemTools::IsOff(def))
{
std::string f = def;
@ -196,16 +196,16 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
// Set a variable marking whether the package was found.
std::string foundVar = this->Name;
foundVar += "_FOUND";
m_Makefile->AddDefinition(foundVar.c_str(), found? "1":"0");
this->Makefile->AddDefinition(foundVar.c_str(), found? "1":"0");
if(needCompatibility)
{
// Listfiles will be looking for the capitalized version of the
// name. Provide it.
m_Makefile->AddDefinition(upperDir.c_str(),
m_Makefile->GetDefinition(this->Variable.c_str()));
m_Makefile->AddDefinition(upperFound.c_str(),
m_Makefile->GetDefinition(foundVar.c_str()));
this->Makefile->AddDefinition(upperDir.c_str(),
this->Makefile->GetDefinition(this->Variable.c_str()));
this->Makefile->AddDefinition(upperFound.c_str(),
this->Makefile->GetDefinition(foundVar.c_str()));
}
#ifdef CMAKE_BUILD_WITH_CMAKE
@ -215,11 +215,11 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
{
// Listfiles may use the capitalized version of the name.
// Remove any previously added watch.
m_Makefile->GetVariableWatch()->RemoveWatch(
this->Makefile->GetVariableWatch()->RemoveWatch(
upperDir.c_str(),
cmFindPackageNeedBackwardsCompatibility
);
m_Makefile->GetVariableWatch()->RemoveWatch(
this->Makefile->GetVariableWatch()->RemoveWatch(
upperFound.c_str(),
cmFindPackageNeedBackwardsCompatibility
);
@ -228,11 +228,11 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
{
// Listfiles should not be using the capitalized version of the
// name. Add a watch to warn the user.
m_Makefile->GetVariableWatch()->AddWatch(
this->Makefile->GetVariableWatch()->AddWatch(
upperDir.c_str(),
cmFindPackageNeedBackwardsCompatibility
);
m_Makefile->GetVariableWatch()->AddWatch(
this->Makefile->GetVariableWatch()->AddWatch(
upperFound.c_str(),
cmFindPackageNeedBackwardsCompatibility
);
@ -249,7 +249,7 @@ bool cmFindPackageCommand::FindModule(bool& found, bool quiet, bool required)
std::string module = "Find";
module += this->Name;
module += ".cmake";
std::string mfile = m_Makefile->GetModulesFile(module.c_str());
std::string mfile = this->Makefile->GetModulesFile(module.c_str());
if ( mfile.size() )
{
if(quiet)
@ -258,7 +258,7 @@ bool cmFindPackageCommand::FindModule(bool& found, bool quiet, bool required)
// quietly.
std::string quietly = this->Name;
quietly += "_FIND_QUIETLY";
m_Makefile->AddDefinition(quietly.c_str(), "1");
this->Makefile->AddDefinition(quietly.c_str(), "1");
}
if(required)
@ -267,7 +267,7 @@ bool cmFindPackageCommand::FindModule(bool& found, bool quiet, bool required)
// a fatal error if the package is not found.
std::string req = this->Name;
req += "_FIND_REQUIRED";
m_Makefile->AddDefinition(req.c_str(), "1");
this->Makefile->AddDefinition(req.c_str(), "1");
}
// Load the module we found.
@ -330,7 +330,7 @@ bool cmFindPackageCommand::FindConfig()
std::string init = this->SearchForConfig();
// Store the entry in the cache so it can be set by the user.
m_Makefile->AddCacheDefinition(this->Variable.c_str(),
this->Makefile->AddCacheDefinition(this->Variable.c_str(),
init.c_str(),
help.c_str(),
cmCacheManager::PATH);
@ -393,7 +393,7 @@ std::string cmFindPackageCommand::SearchForConfig() const
//----------------------------------------------------------------------------
bool cmFindPackageCommand::ReadListFile(const char* f)
{
if(m_Makefile->ReadListFile(m_Makefile->GetCurrentListFile(),f))
if(this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(),f))
{
return true;
}

View File

@ -64,7 +64,7 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
{
return true;
}
std::string ff = m_Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");
std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK");
bool supportFrameworks = true;
if( ff.size() == 0 || ff == "NEVER" )
{
@ -108,7 +108,7 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
}
if(result.size() != 0)
{
m_Makefile->AddCacheDefinition(this->VariableName.c_str(),
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
result.c_str(),
this->VariableDocumentation.c_str(),
(this->IncludeFileInPath) ?
@ -117,7 +117,7 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn)
}
}
}
m_Makefile->AddCacheDefinition(this->VariableName.c_str(),
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
(this->VariableName + "-NOTFOUND").c_str(),
this->VariableDocumentation.c_str(),
(this->IncludeFileInPath) ?

View File

@ -53,14 +53,14 @@ bool cmFindProgramCommand::InitialPass(std::vector<std::string> const& argsIn)
if(result != "")
{
// Save the value in the cache
m_Makefile->AddCacheDefinition(this->VariableName.c_str(),
result.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
result.c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);
return true;
}
m_Makefile->AddCacheDefinition(this->VariableName.c_str(),
this->Makefile->AddCacheDefinition(this->VariableName.c_str(),
(this->VariableName + "-NOTFOUND").c_str(),
this->VariableDocumentation.c_str(),
cmCacheManager::FILEPATH);

View File

@ -21,49 +21,49 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
{
// Prevent recusion and don't let this blobker block its own
// commands.
if (m_Executing)
if (this->Executing)
{
return false;
}
// at end of for each execute recorded commands
if (cmSystemTools::LowerCase(lff.m_Name) == "endforeach")
if (cmSystemTools::LowerCase(lff.Name) == "endforeach")
{
std::vector<std::string> expandedArguments;
mf.ExpandArguments(lff.m_Arguments, expandedArguments);
if(!expandedArguments.empty() && (expandedArguments[0] == m_Args[0]))
mf.ExpandArguments(lff.Arguments, expandedArguments);
if(!expandedArguments.empty() && (expandedArguments[0] == this->Args[0]))
{
// store the old value
std::string oldDef;
if (mf.GetDefinition(m_Args[0].c_str()))
if (mf.GetDefinition(this->Args[0].c_str()))
{
oldDef = mf.GetDefinition(m_Args[0].c_str());
oldDef = mf.GetDefinition(this->Args[0].c_str());
}
m_Executing = true;
std::vector<std::string>::const_iterator j = m_Args.begin();
this->Executing = true;
std::vector<std::string>::const_iterator j = this->Args.begin();
++j;
std::string tmps;
cmListFileArgument arg;
for( ; j != m_Args.end(); ++j)
for( ; j != this->Args.end(); ++j)
{
// set the variable to the loop value
mf.AddDefinition(m_Args[0].c_str(),j->c_str());
mf.AddDefinition(this->Args[0].c_str(),j->c_str());
// Invoke all the functions that were collected in the block.
for(unsigned int c = 0; c < m_Functions.size(); ++c)
for(unsigned int c = 0; c < this->Functions.size(); ++c)
{
mf.ExecuteCommand(m_Functions[c]);
mf.ExecuteCommand(this->Functions[c]);
}
}
// restore the variable to its prior value
mf.AddDefinition(m_Args[0].c_str(),oldDef.c_str());
mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str());
mf.RemoveFunctionBlocker(lff);
return true;
}
}
// record the command
m_Functions.push_back(lff);
this->Functions.push_back(lff);
// always return true
return true;
@ -72,11 +72,11 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
bool cmForEachFunctionBlocker::
ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf)
{
if(cmSystemTools::LowerCase(lff.m_Name) == "endforeach")
if(cmSystemTools::LowerCase(lff.Name) == "endforeach")
{
std::vector<std::string> expandedArguments;
mf.ExpandArguments(lff.m_Arguments, expandedArguments);
if(!expandedArguments.empty() && (expandedArguments[0] == m_Args[0]))
mf.ExpandArguments(lff.Arguments, expandedArguments);
if(!expandedArguments.empty() && (expandedArguments[0] == this->Args[0]))
{
return true;
}
@ -163,18 +163,18 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args)
break;
}
}
f->m_Args = range;
f->Args = range;
}
else
{
f->m_Args = args;
f->Args = args;
}
}
else
{
f->m_Args = args;
f->Args = args;
}
m_Makefile->AddFunctionBlocker(f);
this->Makefile->AddFunctionBlocker(f);
return true;
}

View File

@ -29,16 +29,16 @@
class cmForEachFunctionBlocker : public cmFunctionBlocker
{
public:
cmForEachFunctionBlocker() {m_Executing = false;}
cmForEachFunctionBlocker() {this->Executing = false;}
virtual ~cmForEachFunctionBlocker() {}
virtual bool IsFunctionBlocked(const cmListFileFunction& lff,
cmMakefile &mf);
virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
virtual void ScopeEnded(cmMakefile &mf);
std::vector<std::string> m_Args;
std::vector<cmListFileFunction> m_Functions;
bool m_Executing;
std::vector<std::string> Args;
std::vector<cmListFileFunction> Functions;
bool Executing;
};
/** \class cmForEachCommand

View File

@ -39,12 +39,12 @@ cmGeneratedFileStream::cmGeneratedFileStream():
//----------------------------------------------------------------------------
cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet):
cmGeneratedFileStreamBase(name),
Stream(m_TempName.c_str())
Stream(TempName.c_str())
{
// Check if the file opened.
if(!*this && !quiet)
{
cmSystemTools::Error("Cannot open file for write: ", m_TempName.c_str());
cmSystemTools::Error("Cannot open file for write: ", this->TempName.c_str());
cmSystemTools::ReportLastSystemError("");
}
}
@ -57,7 +57,7 @@ cmGeneratedFileStream::~cmGeneratedFileStream()
// stream will be destroyed which will close the temporary file.
// Finally the base destructor will be called to replace the
// destination file.
m_Okay = (*this)?true:false;
this->Okay = (*this)?true:false;
}
//----------------------------------------------------------------------------
@ -70,17 +70,17 @@ cmGeneratedFileStream::Open(const char* name, bool quiet, bool binaryFlag)
// Open the temporary output file.
if ( binaryFlag )
{
this->Stream::open(m_TempName.c_str(), std::ios::out | std::ios::binary);
this->Stream::open(this->TempName.c_str(), std::ios::out | std::ios::binary);
}
else
{
this->Stream::open(m_TempName.c_str(), std::ios::out);
this->Stream::open(this->TempName.c_str(), std::ios::out);
}
// Check if the file opened.
if(!*this && !quiet)
{
cmSystemTools::Error("Cannot open file for write: ", m_TempName.c_str());
cmSystemTools::Error("Cannot open file for write: ", this->TempName.c_str());
cmSystemTools::ReportLastSystemError("");
}
return *this;
@ -91,7 +91,7 @@ cmGeneratedFileStream&
cmGeneratedFileStream::Close()
{
// Save whether the temporary output file is valid before closing.
m_Okay = (*this)?true:false;
this->Okay = (*this)?true:false;
// Close the temporary output file.
this->Stream::close();
@ -105,40 +105,40 @@ cmGeneratedFileStream::Close()
//----------------------------------------------------------------------------
void cmGeneratedFileStream::SetCopyIfDifferent(bool copy_if_different)
{
m_CopyIfDifferent = copy_if_different;
this->CopyIfDifferent = copy_if_different;
}
//----------------------------------------------------------------------------
void cmGeneratedFileStream::SetCompression(bool compression)
{
m_Compress = compression;
this->Compress = compression;
}
//----------------------------------------------------------------------------
void cmGeneratedFileStream::SetCompressionExtraExtension(bool ext)
{
m_CompressExtraExtension = ext;
this->CompressExtraExtension = ext;
}
//----------------------------------------------------------------------------
cmGeneratedFileStreamBase::cmGeneratedFileStreamBase():
m_Name(),
m_TempName(),
m_CopyIfDifferent(false),
m_Okay(false),
m_Compress(false),
m_CompressExtraExtension(true)
Name(),
TempName(),
CopyIfDifferent(false),
Okay(false),
Compress(false),
CompressExtraExtension(true)
{
}
//----------------------------------------------------------------------------
cmGeneratedFileStreamBase::cmGeneratedFileStreamBase(const char* name):
m_Name(),
m_TempName(),
m_CopyIfDifferent(false),
m_Okay(false),
m_Compress(false),
m_CompressExtraExtension(true)
Name(),
TempName(),
CopyIfDifferent(false),
Okay(false),
Compress(false),
CompressExtraExtension(true)
{
this->Open(name);
}
@ -153,41 +153,41 @@ cmGeneratedFileStreamBase::~cmGeneratedFileStreamBase()
void cmGeneratedFileStreamBase::Open(const char* name)
{
// Save the original name of the file.
m_Name = name;
this->Name = name;
// Create the name of the temporary file.
m_TempName = name;
m_TempName += ".tmp";
this->TempName = name;
this->TempName += ".tmp";
// Make sure the temporary file that will be used is not present.
cmSystemTools::RemoveFile(m_TempName.c_str());
cmSystemTools::RemoveFile(this->TempName.c_str());
std::string dir = cmSystemTools::GetFilenamePath(m_TempName);
std::string dir = cmSystemTools::GetFilenamePath(this->TempName);
cmSystemTools::MakeDirectory(dir.c_str());
}
//----------------------------------------------------------------------------
void cmGeneratedFileStreamBase::Close()
{
std::string resname = m_Name;
if ( m_Compress && m_CompressExtraExtension )
std::string resname = this->Name;
if ( this->Compress && this->CompressExtraExtension )
{
resname += ".gz";
}
// Only consider replacing the destination file if no error
// occurred.
if(!m_Name.empty() &&
m_Okay &&
(!m_CopyIfDifferent ||
cmSystemTools::FilesDiffer(m_TempName.c_str(), resname.c_str())))
if(!this->Name.empty() &&
this->Okay &&
(!this->CopyIfDifferent ||
cmSystemTools::FilesDiffer(this->TempName.c_str(), resname.c_str())))
{
// The destination is to be replaced. Rename the temporary to the
// destination atomically.
if ( m_Compress )
if ( this->Compress )
{
std::string gzname = m_TempName + ".temp.gz";
if ( this->CompressFile(m_TempName.c_str(), gzname.c_str()) )
std::string gzname = this->TempName + ".temp.gz";
if ( this->CompressFile(this->TempName.c_str(), gzname.c_str()) )
{
this->RenameFile(gzname.c_str(), resname.c_str());
}
@ -195,14 +195,14 @@ void cmGeneratedFileStreamBase::Close()
}
else
{
this->RenameFile(m_TempName.c_str(), resname.c_str());
this->RenameFile(this->TempName.c_str(), resname.c_str());
}
}
// Else, the destination was not replaced.
//
// Always delete the temporary file. We never want it to stay around.
cmSystemTools::RemoveFile(m_TempName.c_str());
cmSystemTools::RemoveFile(this->TempName.c_str());
}
//----------------------------------------------------------------------------
@ -299,8 +299,8 @@ void cmGeneratedFileStream::SetName(const char* fname)
{
if ( !fname )
{
m_Name = "";
this->Name = "";
return;
}
m_Name = fname;
this->Name = fname;
}

View File

@ -41,7 +41,7 @@ protected:
// Internal methods to handle the temporary file. Open is always
// called before the real stream is opened. Close is always called
// after the real stream is closed and m_Okay is set to whether the
// after the real stream is closed and Okay is set to whether the
// real stream was still valid for writing when it was closed.
void Open(const char* name);
void Close();
@ -53,22 +53,22 @@ protected:
int CompressFile(const char* oldname, const char* newname);
// The name of the final destination file for the output.
std::string m_Name;
std::string Name;
// The name of the temporary file.
std::string m_TempName;
std::string TempName;
// Whether to do a copy-if-different.
bool m_CopyIfDifferent;
bool CopyIfDifferent;
// Whether the real file stream was valid when it was closed.
bool m_Okay;
bool Okay;
// Whether the destionation file is compressed
bool m_Compress;
bool Compress;
// Whether the destionation file is compressed
bool m_CompressExtraExtension;
bool CompressExtraExtension;
};
/** \class cmGeneratedFileStream

View File

@ -39,7 +39,7 @@ bool cmGetCMakePropertyCommand::InitialPass(
{
cacheonly = 1;
}
std::vector<std::string> vars = m_Makefile->GetDefinitions(cacheonly);
std::vector<std::string> vars = this->Makefile->GetDefinitions(cacheonly);
for ( cc = 0; cc < vars.size(); cc ++ )
{
if ( cc > 0 )
@ -52,9 +52,9 @@ bool cmGetCMakePropertyCommand::InitialPass(
else if ( args[1] == "COMMANDS" )
{
cmake::RegisteredCommandsMap::iterator cmds
= m_Makefile->GetCMakeInstance()->GetCommands()->begin();
= this->Makefile->GetCMakeInstance()->GetCommands()->begin();
for (cc=0 ;
cmds != m_Makefile->GetCMakeInstance()->GetCommands()->end();
cmds != this->Makefile->GetCMakeInstance()->GetCommands()->end();
++ cmds )
{
if ( cc > 0 )
@ -67,7 +67,7 @@ bool cmGetCMakePropertyCommand::InitialPass(
}
else if ( args[1] == "MACROS" )
{
m_Makefile->GetListOfMacros(output);
this->Makefile->GetListOfMacros(output);
}
else
{
@ -75,7 +75,7 @@ bool cmGetCMakePropertyCommand::InitialPass(
this->SetError(emsg.c_str());
return false;
}
m_Makefile->AddDefinition(variable.c_str(), output.c_str());
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
return true;
}

View File

@ -35,7 +35,7 @@ bool cmGetDirectoryPropertyCommand::InitialPass(
std::string output = "";
// get the directory argument if there is one
cmMakefile *dir = m_Makefile;
cmMakefile *dir = this->Makefile;
if (*i == "DIRECTORY")
{
++i;
@ -49,13 +49,13 @@ bool cmGetDirectoryPropertyCommand::InitialPass(
// make sure the start dir is a full path
if (!cmSystemTools::FileIsFullPath(sd.c_str()))
{
sd = m_Makefile->GetStartDirectory();
sd = this->Makefile->GetStartDirectory();
sd += "/";
sd += *i;
}
// lookup the makefile from the directory name
cmLocalGenerator *lg =
m_Makefile->GetLocalGenerator()->GetGlobalGenerator()->
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
FindLocalGenerator(sd.c_str());
if (!lg)
{
@ -151,13 +151,13 @@ bool cmGetDirectoryPropertyCommand::InitialPass(
const char *prop = dir->GetProperty(i->c_str());
if (prop)
{
m_Makefile->AddDefinition(variable.c_str(), prop);
this->Makefile->AddDefinition(variable.c_str(), prop);
return true;
}
m_Makefile->AddDefinition(variable.c_str(), "");
this->Makefile->AddDefinition(variable.c_str(), "");
return true;
}
m_Makefile->AddDefinition(variable.c_str(), output.c_str());
this->Makefile->AddDefinition(variable.c_str(), output.c_str());
return true;
}

View File

@ -30,7 +30,7 @@ bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const&
// already, if so use that value
if(args.size() == 4 && args[3] == "CACHE")
{
const char* cacheValue = m_Makefile->GetDefinition(args[0].c_str());
const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str());
if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue))
{
return true;
@ -79,7 +79,7 @@ bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const&
// current source directory.
if(!cmSystemTools::FileIsFullPath(filename.c_str()))
{
std::string fname = m_Makefile->GetCurrentDirectory();
std::string fname = this->Makefile->GetCurrentDirectory();
if(!fname.empty())
{
fname += "/";
@ -102,13 +102,13 @@ bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const&
{
if(programArgs.size() && storeArgs.size())
{
m_Makefile->AddCacheDefinition(storeArgs.c_str(),
this->Makefile->AddCacheDefinition(storeArgs.c_str(),
programArgs.c_str(),
"",
args[2] == "PATH" ? cmCacheManager::FILEPATH
: cmCacheManager::STRING);
}
m_Makefile->AddCacheDefinition(args[0].c_str(),
this->Makefile->AddCacheDefinition(args[0].c_str(),
result.c_str(),
"",
args[2] == "PATH" ? cmCacheManager::FILEPATH
@ -118,9 +118,9 @@ bool cmGetFilenameComponentCommand::InitialPass(std::vector<std::string> const&
{
if(programArgs.size() && storeArgs.size())
{
m_Makefile->AddDefinition(storeArgs.c_str(), programArgs.c_str());
this->Makefile->AddDefinition(storeArgs.c_str(), programArgs.c_str());
}
m_Makefile->AddDefinition(args[0].c_str(), result.c_str());
this->Makefile->AddDefinition(args[0].c_str(), result.c_str());
}
return true;

View File

@ -29,19 +29,19 @@ bool cmGetSourceFilePropertyCommand::InitialPass(
}
const char* var = args[0].c_str();
const char* file = args[1].c_str();
cmSourceFile* sf = m_Makefile->GetSource(file);
cmSourceFile* sf = this->Makefile->GetSource(file);
if(sf)
{
const char *prop = sf->GetProperty(args[2].c_str());
if (prop)
{
m_Makefile->AddDefinition(var, prop);
this->Makefile->AddDefinition(var, prop);
return true;
}
}
m_Makefile->AddDefinition(var, "NOTFOUND");
this->Makefile->AddDefinition(var, "NOTFOUND");
return true;
}

View File

@ -28,7 +28,7 @@ bool cmGetTargetPropertyCommand::InitialPass(
const char* var = args[0].c_str();
const char* targetName = args[1].c_str();
cmTarget *tgt = m_Makefile->GetLocalGenerator()->GetGlobalGenerator()
cmTarget *tgt = this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
->FindTarget(0,targetName);
if (tgt)
{
@ -36,11 +36,11 @@ bool cmGetTargetPropertyCommand::InitialPass(
const char *prop = target.GetProperty(args[2].c_str());
if (prop)
{
m_Makefile->AddDefinition(var, prop);
this->Makefile->AddDefinition(var, prop);
return true;
}
}
m_Makefile->AddDefinition(var, "NOTFOUND");
this->Makefile->AddDefinition(var, "NOTFOUND");
return true;
}

View File

@ -31,17 +31,17 @@ bool cmGetTestPropertyCommand::InitialPass(
std::string testName = args[0];
std::string var = args[2];
cmTest *test = m_Makefile->GetTest(testName.c_str());
cmTest *test = this->Makefile->GetTest(testName.c_str());
if (test)
{
const char *prop = test->GetProperty(args[1].c_str());
if (prop)
{
m_Makefile->AddDefinition(var.c_str(), prop);
this->Makefile->AddDefinition(var.c_str(), prop);
return true;
}
}
m_Makefile->AddDefinition(var.c_str(), "NOTFOUND");
this->Makefile->AddDefinition(var.c_str(), "NOTFOUND");
return true;
}

View File

@ -42,13 +42,13 @@ public:
cmGlob::cmGlob()
{
m_Internals = new cmGlobInternal;
m_Recurse = false;
this->Internals = new cmGlobInternal;
this->Recurse = false;
}
cmGlob::~cmGlob()
{
delete m_Internals;
delete this->Internals;
}
void cmGlob::Escape(int ch, char* buffer)
@ -73,7 +73,7 @@ void cmGlob::Escape(int ch, char* buffer)
std::vector<std::string>& cmGlob::GetFiles()
{
return m_Internals->Files;
return this->Internals->Files;
}
std::string cmGlob::ConvertExpression(const std::string& expr)
@ -200,9 +200,9 @@ void cmGlob::RecurseDirectory(std::string::size_type start,
if ( !dir_only || !cmsys::SystemTools::FileIsDirectory(realname.c_str()) )
{
if ( m_Internals->Expressions[m_Internals->Expressions.size()-1].find(fname.c_str()) )
if ( this->Internals->Expressions[this->Internals->Expressions.size()-1].find(fname.c_str()) )
{
m_Internals->Files.push_back(realname);
this->Internals->Files.push_back(realname);
}
}
if ( cmsys::SystemTools::FileIsDirectory(realname.c_str()) )
@ -216,8 +216,8 @@ void cmGlob::ProcessDirectory(std::string::size_type start,
const std::string& dir, bool dir_only)
{
//std::cout << "ProcessDirectory: " << dir << std::endl;
bool last = ( start == m_Internals->Expressions.size()-1 );
if ( last && m_Recurse )
bool last = ( start == this->Internals->Expressions.size()-1 );
if ( last && this->Recurse )
{
this->RecurseDirectory(start, dir, dir_only);
return;
@ -264,7 +264,7 @@ void cmGlob::ProcessDirectory(std::string::size_type start,
}
//std::cout << "Look at file: " << fname << std::endl;
//std::cout << "Match: " << m_Internals->TextExpressions[start].c_str() << std::endl;
//std::cout << "Match: " << this->Internals->TextExpressions[start].c_str() << std::endl;
//std::cout << "Full name: " << fullname << std::endl;
if ( (!dir_only || !last) && !cmsys::SystemTools::FileIsDirectory(realname.c_str()) )
@ -272,11 +272,11 @@ void cmGlob::ProcessDirectory(std::string::size_type start,
continue;
}
if ( m_Internals->Expressions[start].find(fname.c_str()) )
if ( this->Internals->Expressions[start].find(fname.c_str()) )
{
if ( last )
{
m_Internals->Files.push_back(realname);
this->Internals->Files.push_back(realname);
}
else
{
@ -292,8 +292,8 @@ bool cmGlob::FindFiles(const std::string& inexpr)
std::string::size_type cc;
std::string expr = inexpr;
m_Internals->Expressions.clear();
m_Internals->Files.clear();
this->Internals->Expressions.clear();
this->Internals->Files.clear();
if ( !cmsys::SystemTools::FileIsFullPath(expr.c_str()) )
{
@ -393,9 +393,9 @@ bool cmGlob::FindFiles(const std::string& inexpr)
void cmGlob::AddExpression(const char* expr)
{
m_Internals->Expressions.push_back(
this->Internals->Expressions.push_back(
cmsys::RegularExpression(
this->ConvertExpression(expr).c_str()));
m_Internals->TextExpressions.push_back(this->ConvertExpression(expr));
this->Internals->TextExpressions.push_back(this->ConvertExpression(expr));
}

View File

@ -41,8 +41,8 @@ public:
//! Set recurse to true to match subdirectories.
void RecurseOn() { this->SetRecurse(true); }
void RecurseOff() { this->SetRecurse(false); }
void SetRecurse(bool i) { m_Recurse = i; }
bool GetRecurse() { return m_Recurse; }
void SetRecurse(bool i) { this->Recurse = i; }
bool GetRecurse() { return this->Recurse; }
protected:
//! Process directory
@ -65,8 +65,8 @@ protected:
//! Add regular expression
void AddExpression(const char* expr);
cmGlobInternal* m_Internals;
bool m_Recurse;
cmGlobInternal* Internals;
bool Recurse;
};

View File

@ -21,16 +21,16 @@
cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator()
{
m_EmptyRuleHackDepends = "NUL";
m_FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
m_ForceUnixPaths = false;
this->EmptyRuleHackDepends = "NUL";
this->FindMakeProgramFile = "CMakeBorlandFindMake.cmake";
this->ForceUnixPaths = false;
}
void cmGlobalBorlandMakefileGenerator::EnableLanguage(std::vector<std::string>const& l,
cmMakefile *mf)
{
std::string outdir = m_CMakeInstance->GetStartOutputDirectory();
std::string outdir = this->CMakeInstance->GetStartOutputDirectory();
mf->AddDefinition("BORLAND", "1");
mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32");

View File

@ -32,33 +32,33 @@ int cmGlobalGenerator::s_TryCompileTimeout = 0;
cmGlobalGenerator::cmGlobalGenerator()
{
// by default use the native paths
m_ForceUnixPaths = false;
this->ForceUnixPaths = false;
}
cmGlobalGenerator::~cmGlobalGenerator()
{
// Delete any existing cmLocalGenerators
unsigned int i;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
delete m_LocalGenerators[i];
delete this->LocalGenerators[i];
}
m_LocalGenerators.clear();
this->LocalGenerators.clear();
}
// Find the make program for the generator, required for try compiles
void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
{
if(m_FindMakeProgramFile.size() == 0)
if(this->FindMakeProgramFile.size() == 0)
{
cmSystemTools::Error(
"Generator implementation error, "
"all generators must specify m_FindMakeProgramFile");
"all generators must specify this->FindMakeProgramFile");
}
if(!mf->GetDefinition("CMAKE_MAKE_PROGRAM")
|| cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM")))
{
std::string setMakeProgram = mf->GetModulesFile(m_FindMakeProgramFile.c_str());
std::string setMakeProgram = mf->GetModulesFile(this->FindMakeProgramFile.c_str());
if(setMakeProgram.size())
{
mf->ReadListFile(0, setMakeProgram.c_str());
@ -146,9 +146,9 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
// If the configuration files path has been set,
// then we are in a try compile and need to copy the enable language
// files from the parent cmake bin dir, into the try compile bin dir
if(m_ConfiguredFilesPath.size())
if(this->ConfiguredFilesPath.size())
{
std::string src = m_ConfiguredFilesPath;
std::string src = this->ConfiguredFilesPath;
src += "/CMakeSystem.cmake";
std::string dst = rootBin;
dst += "/CMakeSystem.cmake";
@ -162,7 +162,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
continue;
}
const char* lang = l->c_str();
std::string src2 = m_ConfiguredFilesPath;
std::string src2 = this->ConfiguredFilesPath;
src2 += "/CMake";
src2 += lang;
src2 += "Compiler.cmake";
@ -171,7 +171,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
dst2 += lang;
dst2 += "Compiler.cmake";
cmSystemTools::CopyFileIfDifferent(src2.c_str(), dst2.c_str());
src2 = m_ConfiguredFilesPath;
src2 = this->ConfiguredFilesPath;
src2 += "/CMake";
src2 += lang;
src2 += "Platform.cmake";
@ -181,7 +181,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
dst2 += "Platform.cmake";
cmSystemTools::CopyFileIfDifferent(src2.c_str(), dst2.c_str());
}
rootBin = m_ConfiguredFilesPath;
rootBin = this->ConfiguredFilesPath;
}
// find and make sure CMAKE_MAKE_PROGRAM is defined
@ -246,7 +246,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
unsigned int cacheMinor = mf->GetCacheMinorVersion();
unsigned int selfMajor = cmMakefile::GetMajorVersion();
unsigned int selfMinor = cmMakefile::GetMinorVersion();
if((m_CMakeInstance->GetIsInTryCompile() ||
if((this->CMakeInstance->GetIsInTryCompile() ||
(selfMajor == cacheMajor && selfMinor == cacheMinor))
&& !mf->GetDefinition(loadedLang.c_str()))
{
@ -268,7 +268,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
if(!this->GetLanguageEnabled(lang) )
{
if (m_CMakeInstance->GetIsInTryCompile())
if (this->CMakeInstance->GetIsInTryCompile())
{
cmSystemTools::Error("This should not have happen. "
"If you see this message, you are probably using a "
@ -368,7 +368,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
// If the language is untested then test it now with a try compile.
if(needTestLanguage[lang])
{
if (!m_CMakeInstance->GetIsInTryCompile())
if (!this->CMakeInstance->GetIsInTryCompile())
{
std::string testLang = "CMakeTest";
testLang += lang;
@ -438,9 +438,9 @@ const char* cmGlobalGenerator::GetLanguageOutputExtensionForLanguage(const char*
{
return "";
}
if(m_LanguageToOutputExtension.count(lang) > 0)
if(this->LanguageToOutputExtension.count(lang) > 0)
{
return m_LanguageToOutputExtension[lang].c_str();
return this->LanguageToOutputExtension[lang].c_str();
}
return "";
}
@ -457,7 +457,7 @@ const char* cmGlobalGenerator::GetLanguageOutputExtensionFromExtension(const cha
// if no language is found then check to see if it is already an
// ouput extension for some language. In that case it should be ignored
// and in this map, so it will not be compiled but will just be used.
if(m_OutputExtensions.count(ext))
if(this->OutputExtensions.count(ext))
{
return ext;
}
@ -475,16 +475,16 @@ const char* cmGlobalGenerator::GetLanguageFromExtension(const char* ext)
{
++ext;
}
if(m_ExtensionToLanguage.count(ext) > 0)
if(this->ExtensionToLanguage.count(ext) > 0)
{
return m_ExtensionToLanguage[ext].c_str();
return this->ExtensionToLanguage[ext].c_str();
}
return 0;
}
void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf)
{
if(m_LanguageEnabled.count(l) > 0)
if(this->LanguageEnabled.count(l) > 0)
{
return;
}
@ -493,11 +493,11 @@ void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf)
const char* outputExtension = mf->GetDefinition(outputExtensionVar.c_str());
if(outputExtension)
{
m_LanguageToOutputExtension[l] = outputExtension;
m_OutputExtensions[outputExtension] = outputExtension;
this->LanguageToOutputExtension[l] = outputExtension;
this->OutputExtensions[outputExtension] = outputExtension;
if(outputExtension[0] == '.')
{
m_OutputExtensions[outputExtension+1] = outputExtension+1;
this->OutputExtensions[outputExtension+1] = outputExtension+1;
}
}
@ -508,7 +508,7 @@ void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf)
{
linkerPref = "None";
}
m_LanguageToLinkerPreference[l] = linkerPref;
this->LanguageToLinkerPreference[l] = linkerPref;
std::string extensionsVar = std::string("CMAKE_") +
std::string(l) + std::string("_SOURCE_FILE_EXTENSIONS");
@ -521,15 +521,15 @@ void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf)
for(std::vector<std::string>::iterator i = extensionList.begin();
i != extensionList.end(); ++i)
{
m_ExtensionToLanguage[*i] = l;
this->ExtensionToLanguage[*i] = l;
}
cmSystemTools::ExpandListArgument(ignoreExts, extensionList);
for(std::vector<std::string>::iterator i = extensionList.begin();
i != extensionList.end(); ++i)
{
m_IgnoreExtensions[*i] = true;
this->IgnoreExtensions[*i] = true;
}
m_LanguageEnabled[l] = true;
this->LanguageEnabled[l] = true;
}
bool cmGlobalGenerator::IgnoreFile(const char* l)
@ -538,41 +538,41 @@ bool cmGlobalGenerator::IgnoreFile(const char* l)
{
return false;
}
return (m_IgnoreExtensions.count(l) > 0);
return (this->IgnoreExtensions.count(l) > 0);
}
bool cmGlobalGenerator::GetLanguageEnabled(const char* l)
{
return (m_LanguageEnabled.count(l) > 0);
return (this->LanguageEnabled.count(l) > 0);
}
void cmGlobalGenerator::ClearEnabledLanguages()
{
m_LanguageEnabled.clear();
this->LanguageEnabled.clear();
}
void cmGlobalGenerator::Configure()
{
// Delete any existing cmLocalGenerators
unsigned int i;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
delete m_LocalGenerators[i];
delete this->LocalGenerators[i];
}
m_LocalGenerators.clear();
this->LocalGenerators.clear();
// Setup relative path generation.
this->ConfigureRelativePaths();
// start with this directory
cmLocalGenerator *lg = this->CreateLocalGenerator();
m_LocalGenerators.push_back(lg);
this->LocalGenerators.push_back(lg);
// set the Start directories
lg->GetMakefile()->SetStartDirectory
(m_CMakeInstance->GetStartDirectory());
(this->CMakeInstance->GetStartDirectory());
lg->GetMakefile()->SetStartOutputDirectory
(m_CMakeInstance->GetStartOutputDirectory());
(this->CMakeInstance->GetStartOutputDirectory());
lg->GetMakefile()->MakeStartDirectoriesCurrent();
// now do it
@ -581,7 +581,7 @@ void cmGlobalGenerator::Configure()
// update the cache entry for the number of local generators, this is used
// for progress
char num[100];
sprintf(num,"%d",static_cast<int>(m_LocalGenerators.size()));
sprintf(num,"%d",static_cast<int>(this->LocalGenerators.size()));
this->GetCMakeInstance()->AddCacheEntry
("CMAKE_NUMBER_OF_LOCAL_GENERATORS", num,
"number of local generators", cmCacheManager::INTERNAL);
@ -589,17 +589,17 @@ void cmGlobalGenerator::Configure()
std::set<cmStdString> notFoundMap;
// after it is all done do a ConfigureFinalPass
cmCacheManager* manager = 0;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
manager = m_LocalGenerators[i]->GetMakefile()->GetCacheManager();
m_LocalGenerators[i]->ConfigureFinalPass();
manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager();
this->LocalGenerators[i]->ConfigureFinalPass();
cmTargets & targets =
m_LocalGenerators[i]->GetMakefile()->GetTargets();
this->LocalGenerators[i]->GetMakefile()->GetTargets();
for (cmTargets::iterator l = targets.begin();
l != targets.end(); l++)
{
cmTarget::LinkLibraries libs = l->second.GetLinkLibraries();
for(cmTarget::LinkLibraries::iterator lib = libs.begin();
cmTarget::LinkLibraryVectorType libs = l->second.GetLinkLibraries();
for(cmTarget::LinkLibraryVectorType::iterator lib = libs.begin();
lib != libs.end(); ++lib)
{
if(lib->first.size() > 9 &&
@ -610,7 +610,7 @@ void cmGlobalGenerator::Configure()
}
}
std::vector<std::string>& incs =
m_LocalGenerators[i]->GetMakefile()->GetIncludeDirectories();
this->LocalGenerators[i]->GetMakefile()->GetIncludeDirectories();
for( std::vector<std::string>::iterator lib = incs.begin();
lib != incs.end(); ++lib)
@ -622,9 +622,9 @@ void cmGlobalGenerator::Configure()
notFoundMap.insert(varName);
}
}
m_CMakeInstance->UpdateProgress("Configuring",
0.9f+0.1f*(i+1.0f)/m_LocalGenerators.size());
m_LocalGenerators[i]->GetMakefile()->CheckInfiniteLoops();
this->CMakeInstance->UpdateProgress("Configuring",
0.9f+0.1f*(i+1.0f)/this->LocalGenerators.size());
this->LocalGenerators[i]->GetMakefile()->CheckInfiniteLoops();
}
}
@ -651,12 +651,12 @@ void cmGlobalGenerator::Configure()
"Please set the following variables:\n",
notFoundVars.c_str());
}
// at this point m_LocalGenerators has been filled,
// at this point this->LocalGenerators has been filled,
// so create the map from project name to vector of local generators
this->FillProjectMap();
if ( !m_CMakeInstance->GetScriptMode() )
if ( !this->CMakeInstance->GetScriptMode() )
{
m_CMakeInstance->UpdateProgress("Configuring done", -1);
this->CMakeInstance->UpdateProgress("Configuring done", -1);
}
}
@ -668,9 +668,9 @@ void cmGlobalGenerator::Generate()
// Consolidate global targets
cmTargets globalTargets;
this->CreateDefaultGlobalTargets(&globalTargets);
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
cmTargets* targets = &(m_LocalGenerators[i]->GetMakefile()->GetTargets());
cmTargets* targets = &(this->LocalGenerators[i]->GetMakefile()->GetTargets());
cmTargets::iterator tarIt;
for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt )
{
@ -682,21 +682,21 @@ void cmGlobalGenerator::Generate()
}
// Generate project files
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
cmTargets* targets = &(m_LocalGenerators[i]->GetMakefile()->GetTargets());
cmTargets* targets = &(this->LocalGenerators[i]->GetMakefile()->GetTargets());
cmTargets::iterator tit;
for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit )
{
(*targets)[tit->first] = tit->second;
}
m_LocalGenerators[i]->Generate();
m_LocalGenerators[i]->GenerateInstallRules();
m_LocalGenerators[i]->GenerateTestFiles();
m_CMakeInstance->UpdateProgress("Generating",
(i+1.0f)/m_LocalGenerators.size());
this->LocalGenerators[i]->Generate();
this->LocalGenerators[i]->GenerateInstallRules();
this->LocalGenerators[i]->GenerateTestFiles();
this->CMakeInstance->UpdateProgress("Generating",
(i+1.0f)/this->LocalGenerators.size());
}
m_CMakeInstance->UpdateProgress("Generating done", -1);
this->CMakeInstance->UpdateProgress("Generating done", -1);
}
int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir,
@ -705,7 +705,7 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir,
std::string *output, cmMakefile *mf)
{
std::string makeCommand =
m_CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM");
this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM");
if(makeCommand.size() == 0)
{
cmSystemTools::Error(
@ -847,12 +847,12 @@ int cmGlobalGenerator::Build(
void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
{
m_LocalGenerators.push_back(lg);
this->LocalGenerators.push_back(lg);
// update progress
// estimate how many lg there will be
const char *numGenC =
m_CMakeInstance->GetCacheManager()->GetCacheValue
this->CMakeInstance->GetCacheManager()->GetCacheValue
("CMAKE_NUMBER_OF_LOCAL_GENERATORS");
if (!numGenC)
@ -861,12 +861,12 @@ void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg)
}
int numGen = atoi(numGenC);
float prog = 0.9f*m_LocalGenerators.size()/numGen;
float prog = 0.9f*this->LocalGenerators.size()/numGen;
if (prog > 0.9f)
{
prog = 0.9f;
}
m_CMakeInstance->UpdateProgress("Configuring", prog);
this->CMakeInstance->UpdateProgress("Configuring", prog);
}
cmLocalGenerator *cmGlobalGenerator::CreateLocalGenerator()
@ -887,12 +887,12 @@ void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen )
"make program",
cmCacheManager::FILEPATH);
// copy the enabled languages
this->m_LanguageEnabled = gen->m_LanguageEnabled;
this->m_ExtensionToLanguage = gen->m_ExtensionToLanguage;
this->m_IgnoreExtensions = gen->m_IgnoreExtensions;
this->m_LanguageToOutputExtension = gen->m_LanguageToOutputExtension;
this->m_LanguageToLinkerPreference = gen->m_LanguageToLinkerPreference;
this->m_OutputExtensions = gen->m_OutputExtensions;
this->LanguageEnabled = gen->LanguageEnabled;
this->ExtensionToLanguage = gen->ExtensionToLanguage;
this->IgnoreExtensions = gen->IgnoreExtensions;
this->LanguageToOutputExtension = gen->LanguageToOutputExtension;
this->LanguageToLinkerPreference = gen->LanguageToLinkerPreference;
this->OutputExtensions = gen->OutputExtensions;
}
//----------------------------------------------------------------------------
@ -921,8 +921,8 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
void cmGlobalGenerator::GetEnabledLanguages(std::vector<std::string>& lang)
{
for(std::map<cmStdString, bool>::iterator i = m_LanguageEnabled.begin();
i != m_LanguageEnabled.end(); ++i)
for(std::map<cmStdString, bool>::iterator i = this->LanguageEnabled.begin();
i != this->LanguageEnabled.end(); ++i)
{
lang.push_back(i->first);
}
@ -930,9 +930,9 @@ void cmGlobalGenerator::GetEnabledLanguages(std::vector<std::string>& lang)
const char* cmGlobalGenerator::GetLinkerPreference(const char* lang)
{
if(m_LanguageToLinkerPreference.count(lang))
if(this->LanguageToLinkerPreference.count(lang))
{
return m_LanguageToLinkerPreference[lang].c_str();
return this->LanguageToLinkerPreference[lang].c_str();
}
return "None";
}
@ -940,19 +940,19 @@ const char* cmGlobalGenerator::GetLinkerPreference(const char* lang)
void cmGlobalGenerator::FillProjectMap()
{
m_ProjectMap.clear(); // make sure we start with a clean map
this->ProjectMap.clear(); // make sure we start with a clean map
unsigned int i;
for(i = 0; i < m_LocalGenerators.size(); ++i)
for(i = 0; i < this->LocalGenerators.size(); ++i)
{
// for each local generator add all projects
cmLocalGenerator *lg = m_LocalGenerators[i];
cmLocalGenerator *lg = this->LocalGenerators[i];
std::string name;
do
{
if (name != lg->GetMakefile()->GetProjectName())
{
name = lg->GetMakefile()->GetProjectName();
m_ProjectMap[name].push_back(m_LocalGenerators[i]);
this->ProjectMap[name].push_back(this->LocalGenerators[i]);
}
lg = lg->GetParent();
}
@ -964,7 +964,7 @@ void cmGlobalGenerator::FillProjectMap()
///! Find a local generator by its startdirectory
cmLocalGenerator* cmGlobalGenerator::FindLocalGenerator(const char* start_dir)
{
std::vector<cmLocalGenerator*>* gens = &m_LocalGenerators;
std::vector<cmLocalGenerator*>* gens = &this->LocalGenerators;
for(unsigned int i = 0; i < gens->size(); ++i)
{
std::string sd = (*gens)[i]->GetMakefile()->GetStartDirectory();
@ -980,10 +980,10 @@ cmLocalGenerator* cmGlobalGenerator::FindLocalGenerator(const char* start_dir)
cmTarget* cmGlobalGenerator::FindTarget(const char* project,
const char* name)
{
std::vector<cmLocalGenerator*>* gens = &m_LocalGenerators;
std::vector<cmLocalGenerator*>* gens = &this->LocalGenerators;
if(project)
{
gens = &m_ProjectMap[project];
gens = &this->ProjectMap[project];
}
for(unsigned int i = 0; i < gens->size(); ++i)
{
@ -1002,17 +1002,17 @@ void cmGlobalGenerator::ConfigureRelativePaths()
// The current working directory on Windows cannot be a network
// path. Therefore relative paths cannot work when the build tree
// is a network path.
std::string source = m_CMakeInstance->GetHomeDirectory();
std::string binary = m_CMakeInstance->GetHomeOutputDirectory();
std::string source = this->CMakeInstance->GetHomeDirectory();
std::string binary = this->CMakeInstance->GetHomeOutputDirectory();
if(binary.size() < 2 || binary.substr(0, 2) != "//")
{
m_RelativePathTopSource = source;
m_RelativePathTopBinary = binary;
this->RelativePathTopSource = source;
this->RelativePathTopBinary = binary;
}
else
{
m_RelativePathTopSource = "";
m_RelativePathTopBinary = "";
this->RelativePathTopSource = "";
this->RelativePathTopBinary = "";
}
}
@ -1035,14 +1035,14 @@ cmGlobalGenerator::ConvertToRelativePath(const std::vector<std::string>& local,
// Skip conversion if the path is not in the source or binary tree.
std::string original = in_remote;
if((original.size() < m_RelativePathTopSource.size() ||
if((original.size() < this->RelativePathTopSource.size() ||
!cmSystemTools::ComparePath(
original.substr(0, m_RelativePathTopSource.size()).c_str(),
m_RelativePathTopSource.c_str())) &&
(original.size() < m_RelativePathTopBinary.size() ||
original.substr(0, this->RelativePathTopSource.size()).c_str(),
this->RelativePathTopSource.c_str())) &&
(original.size() < this->RelativePathTopBinary.size() ||
!cmSystemTools::ComparePath(
original.substr(0, m_RelativePathTopBinary.size()).c_str(),
m_RelativePathTopBinary.c_str())))
original.substr(0, this->RelativePathTopBinary.size()).c_str(),
this->RelativePathTopBinary.c_str())))
{
return in_remote;
}
@ -1129,7 +1129,7 @@ inline std::string removeQuotes(const std::string& s)
void cmGlobalGenerator::SetupTests()
{
std::string ctest =
m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
this->LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
ctest = removeQuotes(ctest);
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/";
@ -1138,7 +1138,7 @@ void cmGlobalGenerator::SetupTests()
if(!cmSystemTools::FileExists(ctest.c_str()))
{
ctest =
m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
this->LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/Debug/";
ctest += "ctest";
@ -1147,7 +1147,7 @@ void cmGlobalGenerator::SetupTests()
if(!cmSystemTools::FileExists(ctest.c_str()))
{
ctest =
m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
this->LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
ctest = cmSystemTools::GetFilenamePath(ctest.c_str());
ctest += "/Release/";
ctest += "ctest";
@ -1158,9 +1158,9 @@ void cmGlobalGenerator::SetupTests()
{
// Create a full path filename for output Testfile
std::string fname;
fname = m_CMakeInstance->GetStartOutputDirectory();
fname = this->CMakeInstance->GetStartOutputDirectory();
fname += "/";
if ( m_LocalGenerators[0]->GetMakefile()->IsSet("CTEST_NEW_FORMAT") )
if ( this->LocalGenerators[0]->GetMakefile()->IsSet("CTEST_NEW_FORMAT") )
{
fname += "CTestTestfile.txt";
}
@ -1172,9 +1172,9 @@ void cmGlobalGenerator::SetupTests()
// Add run_test only if any tests are foun
long total_tests = 0;
unsigned int i;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
total_tests += m_LocalGenerators[i]->GetMakefile()->GetTests()->size();
total_tests += this->LocalGenerators[i]->GetMakefile()->GetTests()->size();
}
// If the file doesn't exist, then ENABLE_TESTING hasn't been run
@ -1184,7 +1184,7 @@ void cmGlobalGenerator::SetupTests()
const char* no_working_dir = 0;
std::vector<std::string> no_depends;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
std::vector<cmLocalGenerator*>& gen = it->second;
// add the RUN_TESTS to the first local generator of each project
@ -1205,7 +1205,7 @@ void cmGlobalGenerator::SetupTests()
void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
{
cmMakefile* mf = m_LocalGenerators[0]->GetMakefile();
cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
const char* cmakeCfgIntDir = this->GetCMakeCFGInitDirectory();
const char* cmakeCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");

View File

@ -101,28 +101,30 @@ public:
std::string *output,
const char *makeProgram, const char *config,
bool clean);
virtual std::string GenerateBuildCommand(const char* makeProgram,
const char *projectName, const char* additionalOptions,
const char *targetName,
const char* config, bool ignoreErrors);
virtual std::string GenerateBuildCommand
(const char* makeProgram,
const char *projectName, const char* additionalOptions,
const char *targetName,
const char* config, bool ignoreErrors);
///! Set the CMake instance
void SetCMakeInstance(cmake *cm) {
this->m_CMakeInstance = cm; };
void SetCMakeInstance(cmake *cm) { this->CMakeInstance = cm; };
///! Get the CMake instance
cmake *GetCMakeInstance() {
return this->m_CMakeInstance; };
cmake *GetCMakeInstance() { return this->CMakeInstance; };
void SetConfiguredFilesPath(const char* s){this->ConfiguredFilesPath = s;}
cmLocalGenerator* GetLocalGenerator(int p) {
return this->LocalGenerators[p];}
void GetLocalGenerators(std::vector<cmLocalGenerator *>&g) {
g = this->LocalGenerators;}
void SetConfiguredFilesPath(const char* s){m_ConfiguredFilesPath = s;}
cmLocalGenerator* GetLocalGenerator(int p) { return m_LocalGenerators[p];}
void GetLocalGenerators(std::vector<cmLocalGenerator *>&g)
{ g = m_LocalGenerators;}
void AddLocalGenerator(cmLocalGenerator *lg);
static int s_TryCompileTimeout;
bool GetForceUnixPaths() {return m_ForceUnixPaths;}
bool GetForceUnixPaths() {return this->ForceUnixPaths;}
///! return the language for the given extension
const char* GetLanguageFromExtension(const char* ext);
///! is an extension to be ignored
@ -188,31 +190,31 @@ protected:
virtual const char* GetEditCacheTargetName() { return 0; }
virtual const char* GetRebuildCacheTargetName() { return 0; }
bool m_ForceUnixPaths;
cmStdString m_FindMakeProgramFile;
cmStdString m_ConfiguredFilesPath;
cmake *m_CMakeInstance;
std::vector<cmLocalGenerator *> m_LocalGenerators;
bool ForceUnixPaths;
cmStdString FindMakeProgramFile;
cmStdString ConfiguredFilesPath;
cmake *CMakeInstance;
std::vector<cmLocalGenerator *> LocalGenerators;
// map from project name to vector of local generators in that project
std::map<cmStdString, std::vector<cmLocalGenerator*> > m_ProjectMap;
std::map<cmStdString, std::vector<cmLocalGenerator*> > ProjectMap;
private:
// If you add a new map here, make sure it is copied
// in EnableLanguagesFromGenerator
std::map<cmStdString, bool> m_IgnoreExtensions;
std::map<cmStdString, bool> m_LanguageEnabled;
std::map<cmStdString, cmStdString> m_OutputExtensions;
std::map<cmStdString, cmStdString> m_LanguageToOutputExtension;
std::map<cmStdString, cmStdString> m_ExtensionToLanguage;
std::map<cmStdString, cmStdString> m_LanguageToLinkerPreference;
std::map<cmStdString, bool> IgnoreExtensions;
std::map<cmStdString, bool> LanguageEnabled;
std::map<cmStdString, cmStdString> OutputExtensions;
std::map<cmStdString, cmStdString> LanguageToOutputExtension;
std::map<cmStdString, cmStdString> ExtensionToLanguage;
std::map<cmStdString, cmStdString> LanguageToLinkerPreference;
// The paths to the tops of the source and binary trees used for
// relative path computation. A path must be either in the source
// tree or the build tree to be converted to a relative path. The
// ConfigureRelativePaths method may set these to be empty when
// using relative paths is unsafe.
std::string m_RelativePathTopSource;
std::string m_RelativePathTopBinary;
std::string RelativePathTopSource;
std::string RelativePathTopBinary;
};
#endif

View File

@ -26,8 +26,8 @@
cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator()
{
// This type of makefile always requires unix style paths
m_ForceUnixPaths = true;
m_FindMakeProgramFile = "CMakeUnixFindMake.cmake";
this->ForceUnixPaths = true;
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
}
///! Create a local generator appropriate to this Global Generator
@ -59,7 +59,7 @@ void cmGlobalKdevelopGenerator::Generate()
// for each sub project in the project create
// a kdevelop project
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
cmMakefile* mf = it->second[0]->GetMakefile();
std::string outputDir=mf->GetStartOutputDirectory();

View File

@ -21,8 +21,8 @@
cmGlobalMSYSMakefileGenerator::cmGlobalMSYSMakefileGenerator()
{
m_FindMakeProgramFile = "CMakeMSYSFindMake.cmake";
m_ForceUnixPaths = true;
this->FindMakeProgramFile = "CMakeMSYSFindMake.cmake";
this->ForceUnixPaths = true;
}
std::string
@ -73,7 +73,7 @@ void cmGlobalMSYSMakefileGenerator::EnableLanguage(std::vector<std::string>const
mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str());
mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str());
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf);
if(!mf->IsSet("CMAKE_AR") && !m_CMakeInstance->GetIsInTryCompile())
if(!mf->IsSet("CMAKE_AR") && !this->CMakeInstance->GetIsInTryCompile())
{
cmSystemTools::Error("CMAKE_AR was not found, please set to archive program. ",
mf->GetDefinition("CMAKE_AR"));

View File

@ -20,8 +20,8 @@
cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator()
{
m_FindMakeProgramFile = "CMakeMinGWFindMake.cmake";
m_ForceUnixPaths = true;
this->FindMakeProgramFile = "CMakeMinGWFindMake.cmake";
this->ForceUnixPaths = true;
}

View File

@ -20,8 +20,8 @@
cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator()
{
m_FindMakeProgramFile = "CMakeNMakeFindMake.cmake";
m_ForceUnixPaths = false;
this->FindMakeProgramFile = "CMakeNMakeFindMake.cmake";
this->ForceUnixPaths = false;
}
void cmGlobalNMakeMakefileGenerator::EnableLanguage(std::vector<std::string>const& l,

View File

@ -24,8 +24,8 @@
cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
{
// This type of makefile always requires unix style paths
m_ForceUnixPaths = true;
m_FindMakeProgramFile = "CMakeUnixFindMake.cmake";
this->ForceUnixPaths = true;
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
}
void cmGlobalUnixMakefileGenerator3
@ -124,7 +124,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// get a local generator for some useful methods
cmLocalUnixMakefileGenerator3 *lg =
static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[0]);
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
// Write the do not edit header.
lg->WriteDisclaimer(makefileStream);
@ -148,9 +148,9 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// The all and preinstall rules might never have any dependencies
// added to them.
if(m_EmptyRuleHackDepends != "")
if(this->EmptyRuleHackDepends != "")
{
depends.push_back(m_EmptyRuleHackDepends);
depends.push_back(this->EmptyRuleHackDepends);
}
// Write and empty all:
@ -170,9 +170,9 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// write the target convenience rules
unsigned int i;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[i]);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
// are any parents excluded
bool exclude = false;
cmLocalGenerator *lg3 = lg;
@ -188,7 +188,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
this->WriteConvenienceRules2(makefileStream,lg,exclude);
}
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[0]);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
lg->WriteSpecialTargetsBottom(makefileStream);
}
@ -214,7 +214,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// get a local generator for some useful methods
cmLocalUnixMakefileGenerator3 *lg =
static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[0]);
static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
// Write the do not edit header.
lg->WriteDisclaimer(cmakefileStream);
@ -226,9 +226,9 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// for each cmMakefile get its list of dependencies
std::vector<std::string> lfiles;
for (unsigned int i = 0; i < m_LocalGenerators.size(); ++i)
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[i]);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
// Get the list of files contributing to this generation step.
lfiles.insert(lfiles.end(),lg->GetMakefile()->GetListFiles().begin(),
@ -241,7 +241,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
lfiles.erase(new_end, lfiles.end());
// reset lg to the first makefile
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[0]);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[0]);
// Build the path to the cache file.
std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory();
@ -279,9 +279,9 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
// add in all the directory information files
std::string tmpStr;
for (unsigned int i = 0; i < m_LocalGenerators.size(); ++i)
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[i]);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
tmpStr = lg->GetMakefile()->GetStartOutputDirectory();
tmpStr += "/CMakeFiles/CMakeDirectoryInformation.cmake";
cmakefileStream << " \"" <<
@ -289,7 +289,7 @@ void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile()
}
cmakefileStream << " )\n\n";
this->WriteMainCMakefileLanguageRules(cmakefileStream, m_LocalGenerators);
this->WriteMainCMakefileLanguageRules(cmakefileStream, this->LocalGenerators);
}
void cmGlobalUnixMakefileGenerator3
@ -383,9 +383,9 @@ cmGlobalUnixMakefileGenerator3
// Work-around for makes that drop rules that have no dependencies
// or commands.
if(depends.empty() && m_EmptyRuleHackDepends != "")
if(depends.empty() && this->EmptyRuleHackDepends != "")
{
depends.push_back(m_EmptyRuleHackDepends);
depends.push_back(this->EmptyRuleHackDepends);
}
// Write the rule.
@ -442,9 +442,9 @@ cmGlobalUnixMakefileGenerator3
// write the target convenience rules
unsigned int i;
cmLocalUnixMakefileGenerator3 *lg;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[i]);
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
// for each target Generate the rule files for each target.
cmTargets& targets = lg->GetMakefile()->GetTargets();
for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
@ -636,8 +636,8 @@ cmGlobalUnixMakefileGenerator3
// Loop over all library dependencies but not for static libs
if (target.GetType() != cmTarget::STATIC_LIBRARY)
{
const cmTarget::LinkLibraries& tlibs = target.GetLinkLibraries();
for(cmTarget::LinkLibraries::const_iterator lib = tlibs.begin();
const cmTarget::LinkLibraryVectorType& tlibs = target.GetLinkLibraries();
for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin();
lib != tlibs.end(); ++lib)
{
// Don't emit the same library twice for this target.
@ -683,14 +683,14 @@ cmGlobalUnixMakefileGenerator3
if (!result)
{
unsigned int i;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
// search all targets
result = m_LocalGenerators[i]->GetMakefile()->FindTarget(name);
result = this->LocalGenerators[i]->GetMakefile()->FindTarget(name);
if (result)
{
lg3 = static_cast<cmLocalUnixMakefileGenerator3 *>
(m_LocalGenerators[i]);
(this->LocalGenerators[i]);
break;
}
}
@ -704,8 +704,9 @@ cmGlobalUnixMakefileGenerator3
depends.push_back(tgtName);
if(result->GetType() == cmTarget::STATIC_LIBRARY)
{
const cmTarget::LinkLibraries& tlibs = result->GetLinkLibraries();
for(cmTarget::LinkLibraries::const_iterator lib = tlibs.begin();
const cmTarget::LinkLibraryVectorType& tlibs
= result->GetLinkLibraries();
for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin();
lib != tlibs.end(); ++lib)
{
// Don't emit the same library twice for this target.
@ -743,9 +744,9 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
// for each local generator
unsigned int i;
cmLocalUnixMakefileGenerator3 *lg2;
for (i = 0; i < m_LocalGenerators.size(); ++i)
for (i = 0; i < this->LocalGenerators.size(); ++i)
{
lg2 = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[i]);
lg2 = static_cast<cmLocalUnixMakefileGenerator3 *>(this->LocalGenerators[i]);
// for the passed in makefile or if this is the top Makefile wripte out
// the targets
if (lg2 == lg || !lg->GetParent())

View File

@ -136,7 +136,7 @@ protected:
// that might not do anything but might have other dependencies
// added later. If non-empty this variable holds a fake dependency
// that can be added.
std::string m_EmptyRuleHackDepends;
std::string EmptyRuleHackDepends;
};
#endif

View File

@ -21,7 +21,7 @@
cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator()
{
m_FindMakeProgramFile = "CMakeVS6FindMake.cmake";
this->FindMakeProgramFile = "CMakeVS6FindMake.cmake";
}
void cmGlobalVisualStudio6Generator::EnableLanguage(std::vector<std::string>const& lang,
@ -159,7 +159,7 @@ void cmGlobalVisualStudio6Generator::Generate()
std::vector<std::string> no_depends;
const char* no_working_dir = 0;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
std::vector<cmLocalGenerator*>& gen = it->second;
// add the ALL_BUILD to the first local generator of each project
@ -381,7 +381,7 @@ void cmGlobalVisualStudio6Generator::OutputDSWFile(cmLocalGenerator* root,
void cmGlobalVisualStudio6Generator::OutputDSWFile()
{
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
this->OutputDSWFile(it->second[0], it->second);
}
@ -406,7 +406,7 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
// insert Begin Project Dependency Project_Dep_Name project stuff here
if (target.GetType() != cmTarget::STATIC_LIBRARY)
{
cmTarget::LinkLibraries::const_iterator j, jend;
cmTarget::LinkLibraryVectorType::const_iterator j, jend;
j = target.GetLinkLibraries().begin();
jend = target.GetLinkLibraries().end();
for(;j!= jend; ++j)

View File

@ -24,8 +24,8 @@
cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator()
{
m_FindMakeProgramFile = "CMakeVS71FindMake.cmake";
m_ProjectConfigurationSectionName = "ProjectConfiguration";
this->FindMakeProgramFile = "CMakeVS71FindMake.cmake";
this->ProjectConfigurationSectionName = "ProjectConfiguration";
}
@ -224,7 +224,7 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
}
fout << "Global\n";
this->WriteSolutionConfigurations(fout);
fout << "\tGlobalSection(" << m_ProjectConfigurationSectionName
fout << "\tGlobalSection(" << this->ProjectConfigurationSectionName
<< ") = postSolution\n";
// loop over again and compute the depends
for(i = 0; i < generators.size(); ++i)
@ -270,8 +270,8 @@ cmGlobalVisualStudio71Generator
::WriteSolutionConfigurations(std::ostream& fout)
{
fout << "\tGlobalSection(SolutionConfiguration) = preSolution\n";
for(std::vector<std::string>::iterator i = m_Configurations.begin();
i != m_Configurations.end(); ++i)
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
fout << "\t\t" << *i << " = " << *i << "\n";
}
@ -313,7 +313,7 @@ cmGlobalVisualStudio71Generator
// insert Begin Project Dependency Project_Dep_Name project stuff here
if (target.GetType() != cmTarget::STATIC_LIBRARY)
{
cmTarget::LinkLibraries::const_iterator j, jend;
cmTarget::LinkLibraryVectorType::const_iterator j, jend;
j = target.GetLinkLibraries().begin();
jend = target.GetLinkLibraries().end();
for(;j!= jend; ++j)
@ -321,7 +321,7 @@ cmGlobalVisualStudio71Generator
if(j->first != dspname)
{
// is the library part of this SLN ? If so add dependency
if(this->FindTarget(m_CurrentProject.c_str(), j->first.c_str()))
if(this->FindTarget(this->CurrentProject.c_str(), j->first.c_str()))
{
fout << "\t\t{" << this->GetGUID(j->first.c_str()) << "} = {"
<< this->GetGUID(j->first.c_str()) << "}\n";
@ -414,8 +414,8 @@ cmGlobalVisualStudio71Generator::WriteProjectConfigurations(std::ostream& fout,
bool in_all_build)
{
std::string guid = this->GetGUID(name);
for(std::vector<std::string>::iterator i = m_Configurations.begin();
i != m_Configurations.end(); ++i)
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|Win32\n";
if (in_all_build)

View File

@ -60,6 +60,6 @@ protected:
virtual void WriteSLNFooter(std::ostream& fout);
virtual void WriteSLNHeader(std::ostream& fout);
std::string m_ProjectConfigurationSectionName;
std::string ProjectConfigurationSectionName;
};
#endif

View File

@ -24,7 +24,7 @@
cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator()
{
m_FindMakeProgramFile = "CMakeVS7FindMake.cmake";
this->FindMakeProgramFile = "CMakeVS7FindMake.cmake";
}
@ -120,7 +120,7 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
{
// process the configurations
const char* ct
= m_CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES");
= this->CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES");
if ( ct )
{
std::string configTypes = ct;
@ -145,10 +145,10 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
config == "MinSizeRel" || config == "RelWithDebInfo")
{
// only add unique configurations
if(std::find(m_Configurations.begin(),
m_Configurations.end(), config) == m_Configurations.end())
if(std::find(this->Configurations.begin(),
this->Configurations.end(), config) == this->Configurations.end())
{
m_Configurations.push_back(config);
this->Configurations.push_back(config);
}
}
else
@ -161,18 +161,18 @@ void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf)
start = endpos+1;
}
}
if(m_Configurations.size() == 0)
if(this->Configurations.size() == 0)
{
m_Configurations.push_back("Debug");
m_Configurations.push_back("Release");
this->Configurations.push_back("Debug");
this->Configurations.push_back("Release");
}
// Reset the entry to have a semi-colon separated list.
std::string configs = m_Configurations[0];
for(unsigned int i=1; i < m_Configurations.size(); ++i)
std::string configs = this->Configurations[0];
for(unsigned int i=1; i < this->Configurations.size(); ++i)
{
configs += ";";
configs += m_Configurations[i];
configs += this->Configurations[i];
}
mf->AddCacheDefinition(
@ -192,7 +192,7 @@ void cmGlobalVisualStudio7Generator::Generate()
const char* no_working_dir = 0;
std::vector<std::string> no_depends;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
std::vector<cmLocalGenerator*>& gen = it->second;
// add the ALL_BUILD to the first local generator of each project
@ -203,7 +203,8 @@ void cmGlobalVisualStudio7Generator::Generate()
no_working_dir,
"echo", "Build all projects");
std::string cmake_command =
m_LocalGenerators[0]->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND");
this->LocalGenerators[0]->GetMakefile()->
GetRequiredDefinition("CMAKE_COMMAND");
}
}
@ -224,7 +225,7 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile(cmLocalGenerator* root,
{
return;
}
m_CurrentProject = root->GetMakefile()->GetProjectName();
this->CurrentProject = root->GetMakefile()->GetProjectName();
std::string fname = root->GetMakefile()->GetStartOutputDirectory();
fname += "/";
fname += root->GetMakefile()->GetProjectName();
@ -242,7 +243,7 @@ void cmGlobalVisualStudio7Generator::OutputSLNFile(cmLocalGenerator* root,
void cmGlobalVisualStudio7Generator::OutputSLNFile()
{
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
this->OutputSLNFile(it->second[0], it->second);
}
@ -422,8 +423,8 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
<< "\tGlobalSection(SolutionConfiguration) = preSolution\n";
int c = 0;
for(std::vector<std::string>::iterator i = m_Configurations.begin();
i != m_Configurations.end(); ++i)
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
fout << "\t\tConfigName." << c << " = " << *i << "\n";
c++;
@ -551,7 +552,7 @@ cmGlobalVisualStudio7Generator
// insert Begin Project Dependency Project_Dep_Name project stuff here
if (target.GetType() != cmTarget::STATIC_LIBRARY)
{
cmTarget::LinkLibraries::const_iterator j, jend;
cmTarget::LinkLibraryVectorType::const_iterator j, jend;
j = target.GetLinkLibraries().begin();
jend = target.GetLinkLibraries().end();
for(;j!= jend; ++j)
@ -559,7 +560,7 @@ cmGlobalVisualStudio7Generator
if(j->first != dspname)
{
// is the library part of this SLN ? If so add dependency
if(this->FindTarget(m_CurrentProject.c_str(), j->first.c_str()))
if(this->FindTarget(this->CurrentProject.c_str(), j->first.c_str()))
{
std::string guid = this->GetGUID(j->first.c_str());
if(guid.size() == 0)
@ -624,8 +625,8 @@ cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout,
bool in_all_build)
{
std::string guid = this->GetGUID(name);
for(std::vector<std::string>::iterator i = m_Configurations.begin();
i != m_Configurations.end(); ++i)
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|Win32\n";
if (in_all_build)
@ -677,7 +678,7 @@ std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name)
{
std::string guidStoreName = name;
guidStoreName += "_GUID_CMAKE";
const char* storedGUID = m_CMakeInstance->GetCacheDefinition(guidStoreName.c_str());
const char* storedGUID = this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str());
if(storedGUID)
{
return std::string(storedGUID);
@ -692,7 +693,7 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
{
std::string guidStoreName = name;
guidStoreName += "_GUID_CMAKE";
if(m_CMakeInstance->GetCacheDefinition(guidStoreName.c_str()))
if(this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()))
{
return;
}
@ -704,13 +705,13 @@ void cmGlobalVisualStudio7Generator::CreateGUID(const char* name)
ret = reinterpret_cast<char*>(uidstr);
RpcStringFree(&uidstr);
ret = cmSystemTools::UpperCase(ret);
m_CMakeInstance->AddCacheEntry(guidStoreName.c_str(), ret.c_str(), "Stored GUID",
this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), ret.c_str(), "Stored GUID",
cmCacheManager::INTERNAL);
}
std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
{
return &m_Configurations;
return &this->Configurations;
};
//----------------------------------------------------------------------------

View File

@ -115,12 +115,12 @@ protected:
const std::vector<std::string>& dependencies);
std::vector<std::string> m_Configurations;
std::map<cmStdString, cmStdString> m_GUIDMap;
std::vector<std::string> Configurations;
std::map<cmStdString, cmStdString> GUIDMap;
// Set during OutputSLNFile with the name of the current project.
// There is one SLN file per project.
std::string m_CurrentProject;
std::string CurrentProject;
};
#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK"

View File

@ -24,8 +24,8 @@
cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator()
{
m_FindMakeProgramFile = "CMakeVS8FindMake.cmake";
m_ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
this->FindMakeProgramFile = "CMakeVS8FindMake.cmake";
this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms";
}
@ -71,7 +71,7 @@ void cmGlobalVisualStudio8Generator::Generate()
const char* no_working_directory = 0;
std::vector<std::string> no_depends;
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
std::vector<cmLocalGenerator*>& generators = it->second;
if(!generators.empty())
@ -203,8 +203,8 @@ cmGlobalVisualStudio8Generator
::WriteSolutionConfigurations(std::ostream& fout)
{
fout << "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n";
for(std::vector<std::string>::iterator i = m_Configurations.begin();
i != m_Configurations.end(); ++i)
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
fout << "\t\t" << *i << "|Win32 = " << *i << "|Win32\n";
}
@ -218,8 +218,8 @@ cmGlobalVisualStudio8Generator
const char* name, bool in_all_build)
{
std::string guid = this->GetGUID(name);
for(std::vector<std::string>::iterator i = m_Configurations.begin();
i != m_Configurations.end(); ++i)
for(std::vector<std::string>::iterator i = this->Configurations.begin();
i != this->Configurations.end(); ++i)
{
fout << "\t\t{" << guid << "}." << *i << "|Win32.ActiveCfg = " << *i << "|Win32\n";
if (in_all_build)

View File

@ -20,8 +20,8 @@
cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
{
m_FindMakeProgramFile = "CMakeFindWMake.cmake";
m_ForceUnixPaths = false;
this->FindMakeProgramFile = "CMakeFindWMake.cmake";
this->ForceUnixPaths = false;
}
void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l,

View File

@ -19,7 +19,7 @@
cmGlobalXCode21Generator::cmGlobalXCode21Generator()
{
this->m_XcodeVersion = 21;
this->this->XcodeVersion = 21;
}
//----------------------------------------------------------------------------
@ -38,8 +38,8 @@ cmGlobalXCode21Generator::WriteXCodePBXProj(std::ostream& fout,
fout << "};\n";
cmXCode21Object::Indent(1, fout);
fout << "objectVersion = 42;\n";
cmXCode21Object::PrintList(m_XCodeObjects, fout);
cmXCode21Object::PrintList(this->XCodeObjects, fout);
cmXCode21Object::Indent(1, fout);
fout << "rootObject = " << m_RootObject->GetId() << " /* Project object */;\n";
fout << "rootObject = " << this->RootObject->GetId() << " /* Project object */;\n";
fout << "}\n";
}

View File

@ -35,29 +35,29 @@ class cmXcodeVersionParser : public cmXMLParser
public:
void StartElement(const char* , const char** )
{
m_Data = "";
this->Data = "";
}
void EndElement(const char* name)
{
if(strcmp(name, "key") == 0)
{
m_Key = m_Data;
this->Key = this->Data;
}
else if(strcmp(name, "string") == 0)
{
if(m_Key == "CFBundleShortVersionString")
if(this->Key == "CFBundleShortVersionString")
{
m_Version = (int)(10.0 * atof(m_Data.c_str()));
this->Version = (int)(10.0 * atof(this->Data.c_str()));
}
}
}
void CharacterDataHandler(const char* data, int length)
{
m_Data.append(data, length);
this->Data.append(data, length);
}
int m_Version;
std::string m_Key;
std::string m_Data;
int this->Version;
std::string this->Key;
std::string this->Data;
};
#endif
@ -68,13 +68,13 @@ public:
//----------------------------------------------------------------------------
cmGlobalXCodeGenerator::cmGlobalXCodeGenerator()
{
m_FindMakeProgramFile = "CMakeFindXCode.cmake";
m_RootObject = 0;
m_MainGroupChildren = 0;
m_SourcesGroupChildren = 0;
m_CurrentMakefile = 0;
m_CurrentLocalGenerator = 0;
m_XcodeVersion = 15;
this->FindMakeProgramFile = "CMakeFindXCode.cmake";
this->RootObject = 0;
this->MainGroupChildren = 0;
this->SourcesGroupChildren = 0;
this->CurrentMakefile = 0;
this->CurrentLocalGenerator = 0;
this->XcodeVersion = 15;
}
//----------------------------------------------------------------------------
@ -83,18 +83,18 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::New()
#if defined(CMAKE_BUILD_WITH_CMAKE)
cmXcodeVersionParser parser;
parser.ParseFile("/Developer/Applications/Xcode.app/Contents/version.plist");
if(parser.m_Version == 15)
if(parser.Version == 15)
{
return new cmGlobalXCodeGenerator;
}
else if (parser.m_Version == 20)
else if (parser.Version == 20)
{
cmSystemTools::Message("Xcode 2.0 not really supported by cmake, "
"using Xcode 15 generator\n");
return new cmGlobalXCodeGenerator;
}
cmGlobalXCodeGenerator* ret = new cmGlobalXCode21Generator;
ret->SetVersion(parser.m_Version);
ret->SetVersion(parser.Version);
return ret;
#else
std::cerr
@ -109,7 +109,7 @@ void cmGlobalXCodeGenerator::EnableLanguage(std::vector<std::string>const&
cmMakefile * mf)
{
mf->AddDefinition("XCODE","1");
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
}
else
@ -151,7 +151,7 @@ std::string cmGlobalXCodeGenerator::GenerateBuildCommand(const char* makeProgram
makeCommand += " -project ";
makeCommand += projectName;
makeCommand += ".xcode";
if(m_XcodeVersion > 20)
if(this->XcodeVersion > 20)
{
makeCommand += "proj";
}
@ -179,7 +179,7 @@ std::string cmGlobalXCodeGenerator::GenerateBuildCommand(const char* makeProgram
{
makeCommand += "ALL_BUILD";
}
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
makeCommand += " -buildstyle Development ";
}
@ -201,39 +201,39 @@ std::string cmGlobalXCodeGenerator::GenerateBuildCommand(const char* makeProgram
void cmGlobalXCodeGenerator::ConfigureOutputPaths()
{
// Format the library and executable output paths.
m_LibraryOutputPath =
m_CurrentMakefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
if(m_LibraryOutputPath.size() == 0)
this->LibraryOutputPath =
this->CurrentMakefile->GetSafeDefinition("LIBRARY_OUTPUT_PATH");
if(this->LibraryOutputPath.size() == 0)
{
m_LibraryOutputPath = m_CurrentMakefile->GetCurrentOutputDirectory();
this->LibraryOutputPath = this->CurrentMakefile->GetCurrentOutputDirectory();
}
// make sure there is a trailing slash
if(m_LibraryOutputPath.size() &&
m_LibraryOutputPath[m_LibraryOutputPath.size()-1] != '/')
if(this->LibraryOutputPath.size() &&
this->LibraryOutputPath[this->LibraryOutputPath.size()-1] != '/')
{
m_LibraryOutputPath += "/";
if(!cmSystemTools::MakeDirectory(m_LibraryOutputPath.c_str()))
this->LibraryOutputPath += "/";
if(!cmSystemTools::MakeDirectory(this->LibraryOutputPath.c_str()))
{
cmSystemTools::Error("Error creating directory ",
m_LibraryOutputPath.c_str());
this->LibraryOutputPath.c_str());
}
}
m_CurrentMakefile->AddLinkDirectory(m_LibraryOutputPath.c_str());
m_ExecutableOutputPath =
m_CurrentMakefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
if(m_ExecutableOutputPath.size() == 0)
this->CurrentMakefile->AddLinkDirectory(this->LibraryOutputPath.c_str());
this->ExecutableOutputPath =
this->CurrentMakefile->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
if(this->ExecutableOutputPath.size() == 0)
{
m_ExecutableOutputPath = m_CurrentMakefile->GetCurrentOutputDirectory();
this->ExecutableOutputPath = this->CurrentMakefile->GetCurrentOutputDirectory();
}
// make sure there is a trailing slash
if(m_ExecutableOutputPath.size() &&
m_ExecutableOutputPath[m_ExecutableOutputPath.size()-1] != '/')
if(this->ExecutableOutputPath.size() &&
this->ExecutableOutputPath[this->ExecutableOutputPath.size()-1] != '/')
{
m_ExecutableOutputPath += "/";
if(!cmSystemTools::MakeDirectory(m_ExecutableOutputPath.c_str()))
this->ExecutableOutputPath += "/";
if(!cmSystemTools::MakeDirectory(this->ExecutableOutputPath.c_str()))
{
cmSystemTools::Error("Error creating directory ",
m_ExecutableOutputPath.c_str());
this->ExecutableOutputPath.c_str());
}
}
}
@ -252,16 +252,16 @@ void cmGlobalXCodeGenerator::Generate()
{
this->cmGlobalGenerator::Generate();
std::map<cmStdString, std::vector<cmLocalGenerator*> >::iterator it;
for(it = m_ProjectMap.begin(); it!= m_ProjectMap.end(); ++it)
for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it)
{
cmLocalGenerator* root = it->second[0];
m_CurrentProject = root->GetMakefile()->GetProjectName();
this->CurrentProject = root->GetMakefile()->GetProjectName();
this->SetCurrentLocalGenerator(root);
m_OutputDir = m_CurrentMakefile->GetHomeOutputDirectory();
m_OutputDir = cmSystemTools::CollapseFullPath(m_OutputDir.c_str());
cmSystemTools::SplitPath(m_OutputDir.c_str(),
m_ProjectOutputDirectoryComponents);
m_CurrentLocalGenerator = root;
this->OutputDir = this->CurrentMakefile->GetHomeOutputDirectory();
this->OutputDir = cmSystemTools::CollapseFullPath(this->OutputDir.c_str());
cmSystemTools::SplitPath(this->OutputDir.c_str(),
this->ProjectOutputDirectoryComponents);
this->CurrentLocalGenerator = root;
// add ALL_BUILD, INSTALL, etc
this->AddExtraTargets(root, it->second);
// now create the project
@ -286,17 +286,17 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root,
// Add XCODE depend helper
std::string dir = mf->GetCurrentOutputDirectory();
m_CurrentXCodeHackMakefile = dir;
m_CurrentXCodeHackMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(m_CurrentXCodeHackMakefile.c_str());
m_CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
this->CurrentXCodeHackMakefile = dir;
this->CurrentXCodeHackMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str());
this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make";
cmCustomCommandLine makecommand;
makecommand.push_back("make");
makecommand.push_back("-C");
makecommand.push_back(dir.c_str());
makecommand.push_back("-f");
makecommand.push_back(m_CurrentXCodeHackMakefile.c_str());
if(m_XcodeVersion > 20)
makecommand.push_back(this->CurrentXCodeHackMakefile.c_str());
if(this->XcodeVersion > 20)
{
makecommand.push_back("all.$(CONFIGURATION)");
}
@ -352,11 +352,11 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
std::unique(lfiles.begin(), lfiles.end());
lfiles.erase(new_end, lfiles.end());
std::string dir = mf->GetHomeOutputDirectory();
m_CurrentReRunCMakeMakefile = dir;
m_CurrentReRunCMakeMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(m_CurrentReRunCMakeMakefile.c_str());
m_CurrentReRunCMakeMakefile += "/ReRunCMake.make";
cmGeneratedFileStream makefileStream(m_CurrentReRunCMakeMakefile.c_str());
this->CurrentReRunCMakeMakefile = dir;
this->CurrentReRunCMakeMakefile += "/CMakeScripts";
cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str());
this->CurrentReRunCMakeMakefile += "/ReRunCMake.make";
cmGeneratedFileStream makefileStream(this->CurrentReRunCMakeMakefile.c_str());
makefileStream.SetCopyIfDifferent(true);
makefileStream << "# Generated by CMake, DO NOT EDIT\n";
makefileStream << "CMakeFiles/cmake.check_cache: ";
@ -376,15 +376,15 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root)
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::ClearXCodeObjects()
{
m_TargetDoneSet.clear();
for(unsigned int i = 0; i < m_XCodeObjects.size(); ++i)
this->TargetDoneSet.clear();
for(unsigned int i = 0; i < this->XCodeObjects.size(); ++i)
{
delete m_XCodeObjects[i];
delete this->XCodeObjects[i];
}
m_XCodeObjects.clear();
m_GroupMap.clear();
m_GroupNameMap.clear();
m_TargetGroup.clear();
this->XCodeObjects.clear();
this->GroupMap.clear();
this->GroupNameMap.clear();
this->TargetGroup.clear();
}
//----------------------------------------------------------------------------
@ -392,7 +392,7 @@ cmXCodeObject*
cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype)
{
cmXCodeObject* obj;
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
obj = new cmXCodeObject(ptype, cmXCodeObject::OBJECT);
}
@ -400,7 +400,7 @@ cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype)
{
obj = new cmXCode21Object(ptype, cmXCodeObject::OBJECT);
}
m_XCodeObjects.push_back(obj);
this->XCodeObjects.push_back(obj);
return obj;
}
@ -409,7 +409,7 @@ cmXCodeObject*
cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::Type type)
{
cmXCodeObject* obj = new cmXCodeObject(cmXCodeObject::None, type);
m_XCodeObjects.push_back(obj);
this->XCodeObjects.push_back(obj);
return obj;
}
@ -445,7 +445,7 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
lg->AppendFlags(flags, sf->GetProperty("COMPILE_FLAGS"));
cmXCodeObject* fileRef = this->CreateObject(cmXCodeObject::PBXFileReference);
cmXCodeObject* group = m_GroupMap[sf];
cmXCodeObject* group = this->GroupMap[sf];
cmXCodeObject* children = group->GetObject("children");
children->AddObject(fileRef);
cmXCodeObject* buildFile = this->CreateObject(cmXCodeObject::PBXBuildFile);
@ -510,7 +510,7 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
fileRef->AddAttribute("name", this->CreateString(file.c_str()));
fileRef->AddAttribute("path", this->CreateString(path.c_str()));
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
fileRef->AddAttribute("refType", this->CreateString("4"));
}
@ -531,11 +531,11 @@ bool cmGlobalXCodeGenerator::SpecialTargetEmitted(std::string const& tname)
if(tname == "ALL_BUILD" || tname == "XCODE_DEPEND_HELPER" ||
tname == "install" || tname == "RUN_TESTS" )
{
if(m_TargetDoneSet.find(tname) != m_TargetDoneSet.end())
if(this->TargetDoneSet.find(tname) != this->TargetDoneSet.end())
{
return true;
}
m_TargetDoneSet.insert(tname);
this->TargetDoneSet.insert(tname);
return false;
}
return false;
@ -544,33 +544,33 @@ bool cmGlobalXCodeGenerator::SpecialTargetEmitted(std::string const& tname)
void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen)
{
m_CurrentLocalGenerator = gen;
m_CurrentMakefile = gen->GetMakefile();
this->CurrentLocalGenerator = gen;
this->CurrentMakefile = gen->GetMakefile();
std::string outdir =
cmSystemTools::CollapseFullPath(m_CurrentMakefile->
cmSystemTools::CollapseFullPath(this->CurrentMakefile->
GetCurrentOutputDirectory());
cmSystemTools::SplitPath(outdir.c_str(), m_CurrentOutputDirectoryComponents);
cmSystemTools::SplitPath(outdir.c_str(), this->CurrentOutputDirectoryComponents);
// Select the current set of configuration types.
m_CurrentConfigurationTypes.clear();
if(m_XcodeVersion > 20)
this->CurrentConfigurationTypes.clear();
if(this->XcodeVersion > 20)
{
if(const char* types =
m_CurrentMakefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
this->CurrentMakefile->GetDefinition("CMAKE_CONFIGURATION_TYPES"))
{
cmSystemTools::ExpandListArgument(types, m_CurrentConfigurationTypes);
cmSystemTools::ExpandListArgument(types, this->CurrentConfigurationTypes);
}
}
if(m_CurrentConfigurationTypes.empty())
if(this->CurrentConfigurationTypes.empty())
{
if(const char* buildType =
m_CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE"))
this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE"))
{
m_CurrentConfigurationTypes.push_back(buildType);
this->CurrentConfigurationTypes.push_back(buildType);
}
else
{
m_CurrentConfigurationTypes.push_back("");
this->CurrentConfigurationTypes.push_back("");
}
}
}
@ -583,7 +583,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
targets)
{
this->SetCurrentLocalGenerator(gen);
cmTargets &tgts = m_CurrentMakefile->GetTargets();
cmTargets &tgts = this->CurrentMakefile->GetTargets();
for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++)
{
cmTarget& cmtarget = l->second;
@ -623,7 +623,7 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
i != classes.end(); ++i)
{
cmXCodeObject* xsf =
this->CreateXCodeSourceFile(m_CurrentLocalGenerator, *i, cmtarget);
this->CreateXCodeSourceFile(this->CurrentLocalGenerator, *i, cmtarget);
cmXCodeObject* fr = xsf->GetObject("fileRef");
cmXCodeObject* filetype =
fr->GetObject()->GetObject("lastKnownFileType");
@ -823,20 +823,20 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
{
if(strcmp(name, "cmakeReRunPhase") == 0)
{
std::string cdir = m_CurrentMakefile->GetHomeOutputDirectory();
std::string cdir = this->CurrentMakefile->GetHomeOutputDirectory();
cdir = this->ConvertToRelativeForMake(cdir.c_str());
std::string makecmd = "make -C ";
makecmd += cdir;
makecmd += " -f ";
makecmd +=
this->ConvertToRelativeForMake(m_CurrentReRunCMakeMakefile.c_str());
this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str());
cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ ");
buildphase->AddAttribute("shellScript",
this->CreateString(makecmd.c_str()));
return;
}
std::string dir = m_CurrentMakefile->GetCurrentOutputDirectory();
std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory();
dir += "/CMakeScripts";
cmSystemTools::MakeDirectory(dir.c_str());
std::string makefile = dir;
@ -900,7 +900,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
for(std::vector<std::string>::const_iterator d = cc.GetDepends().begin();
d != cc.GetDepends().end(); ++d)
{
if(!this->FindTarget(m_CurrentProject.c_str(),
if(!this->FindTarget(this->CurrentProject.c_str(),
d->c_str()))
{
// if the depend is not a target but
@ -949,7 +949,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
}
}
}
std::string cdir = m_CurrentMakefile->GetCurrentOutputDirectory();
std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory();
cdir = this->ConvertToRelativeForXCode(cdir.c_str());
std::string makecmd = "make -C ";
makecmd += cdir;
@ -976,9 +976,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
if(shared)
{
defFlags += "-D";
if(const char* custom_export_name = target.GetProperty("DEFINE_SYMBOL"))
if(const char* custothis->export_name = target.GetProperty("DEFINE_SYMBOL"))
{
defFlags += custom_export_name;
defFlags += custothis->export_name;
}
else
{
@ -994,24 +994,24 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
// for c++ projects get the c flags as well
if(strcmp(lang, "CXX") == 0)
{
m_CurrentLocalGenerator->AddLanguageFlags(cflags, "C", configName);
m_CurrentLocalGenerator->AddSharedFlags(cflags, lang, shared);
this->CurrentLocalGenerator->AddLanguageFlags(cflags, "C", configName);
this->CurrentLocalGenerator->AddSharedFlags(cflags, lang, shared);
}
// Add language-specific flags.
m_CurrentLocalGenerator->AddLanguageFlags(flags, lang, configName);
this->CurrentLocalGenerator->AddLanguageFlags(flags, lang, configName);
// Add shared-library flags if needed.
m_CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared);
}
// Add define flags
m_CurrentLocalGenerator->AppendFlags(defFlags,
m_CurrentMakefile->GetDefineFlags());
this->CurrentLocalGenerator->AppendFlags(defFlags,
this->CurrentMakefile->GetDefineFlags());
cmSystemTools::ReplaceString(defFlags, "\"", "\\\"");
cmSystemTools::ReplaceString(flags, "\"", "\\\"");
cmSystemTools::ReplaceString(cflags, "\"", "\\\"");
if(m_XcodeVersion > 15)
if(this->XcodeVersion > 15)
{
buildSettings->
AddAttribute("GCC_PREPROCESSOR_DEFINITIONS",
@ -1022,17 +1022,17 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
if(target.GetType() == cmTarget::EXECUTABLE)
{
extraLinkOptions =
m_CurrentMakefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
this->CurrentMakefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
}
if(target.GetType() == cmTarget::SHARED_LIBRARY)
{
extraLinkOptions =
m_CurrentMakefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS");
this->CurrentMakefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS");
}
if(target.GetType() == cmTarget::MODULE_LIBRARY)
{
extraLinkOptions =
m_CurrentMakefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS");
this->CurrentMakefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS");
}
const char* targetLinkFlags = target.GetProperty("LINK_FLAGS");
@ -1087,7 +1087,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
buildSettings->AddAttribute("LIBRARY_STYLE",
this->CreateString("BUNDLE"));
if(m_XcodeVersion >= 22)
if(this->XcodeVersion >= 22)
{
fileType = "compiled.mach-o.executable";
productType = "com.apple.product-type.tool";
@ -1173,14 +1173,14 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
{
productType = "com.apple.product-type.application";
std::string f1 =
m_CurrentMakefile->GetModulesFile("MacOSXBundleInfo.plist.in");
this->CurrentMakefile->GetModulesFile("MacOSXBundleInfo.plist.in");
if ( f1.size() == 0 )
{
cmSystemTools::Error("could not find Mac OSX bundle template file.");
}
std::string f2 = m_CurrentMakefile->GetCurrentOutputDirectory();
std::string f2 = this->CurrentMakefile->GetCurrentOutputDirectory();
f2 += "/Info.plist";
m_CurrentMakefile->ConfigureFile(f1.c_str(), f2.c_str(),
this->CurrentMakefile->ConfigureFile(f1.c_str(), f2.c_str(),
false, false, false);
std::string path =
this->ConvertToRelativeForXCode(f2.c_str());
@ -1200,7 +1200,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string dirs;
std::vector<std::string> includes;
m_CurrentLocalGenerator->GetIncludeDirectories(includes);
this->CurrentLocalGenerator->GetIncludeDirectories(includes);
std::vector<std::string>::iterator i = includes.begin();
std::string fdirs;
std::set<cmStdString> emitted;
@ -1385,13 +1385,13 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
std::string productTypeString;
std::string productName;
const char* globalConfig = 0;
if(m_XcodeVersion > 20)
if(this->XcodeVersion > 20)
{
this->AddConfigurations(target, cmtarget);
}
else
{
globalConfig = m_CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE");
globalConfig = this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE");
}
this->CreateBuildSettings(cmtarget,
buildSettings, fileTypeString,
@ -1409,7 +1409,7 @@ cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget)
void cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
cmTarget& cmtarget)
{
std::string configTypes = m_CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES");
std::string configTypes = this->CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES");
std::vector<std::string> configVectorIn;
std::vector<std::string> configVector;
configVectorIn.push_back(configTypes);
@ -1467,13 +1467,13 @@ cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget,
std::string productTypeString;
std::string productName;
const char* globalConfig = 0;
if(m_XcodeVersion > 20)
if(this->XcodeVersion > 20)
{
this->AddConfigurations(target, cmtarget);
}
else
{
globalConfig = m_CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE");
globalConfig = this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE");
}
this->CreateBuildSettings(cmtarget,
buildSettings, fileTypeString,
@ -1507,8 +1507,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(cmTarget* t)
{
return 0;
}
for(std::vector<cmXCodeObject*>::iterator i = m_XCodeObjects.begin();
i != m_XCodeObjects.end(); ++i)
for(std::vector<cmXCodeObject*>::iterator i = this->XCodeObjects.begin();
i != this->XCodeObjects.end(); ++i)
{
cmXCodeObject* o = *i;
if(o->GetcmTarget() == t)
@ -1547,7 +1547,7 @@ void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target,
this->CreateObject(cmXCodeObject::PBXContainerItemProxy);
container->SetComment("PBXContainerItemProxy");
container->AddAttribute("containerPortal",
this->CreateObjectReference(m_RootObject));
this->CreateObjectReference(this->RootObject));
container->AddAttribute("proxyType", this->CreateString("1"));
container->AddAttribute("remoteGlobalIDString",
this->CreateObjectReference(dependTarget));
@ -1607,7 +1607,7 @@ void cmGlobalXCodeGenerator::AppendBuildSettingAttribute(cmXCodeObject* target,
const char* value,
const char* configName)
{
if(m_XcodeVersion < 21)
if(this->XcodeVersion < 21)
{
// There is only one configuration. Add the setting to the buildSettings
// of the target.
@ -1670,7 +1670,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
if(emitted.insert(lib->first).second)
{
// Add this dependency.
cmTarget* t = this->FindTarget(m_CurrentProject.c_str(),
cmTarget* t = this->FindTarget(this->CurrentProject.c_str(),
lib->first.c_str());
cmXCodeObject* dptarget = this->FindXCodeTarget(t);
if(dptarget)
@ -1686,7 +1686,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
= cmtarget->GetUtilities().begin();
i != cmtarget->GetUtilities().end(); ++i)
{
cmTarget* t = this->FindTarget(m_CurrentProject.c_str(),
cmTarget* t = this->FindTarget(this->CurrentProject.c_str(),
i->c_str());
// if the target is in this project then make target depend
// on it. It may not be in this project if this is a sub
@ -1714,7 +1714,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
m += "\n";
m += "But it has no xcode target created yet??\n";
m += "Current project is ";
m += m_CurrentProject.c_str();
m += this->CurrentProject.c_str();
cmSystemTools::Error(m.c_str());
}
}
@ -1722,8 +1722,8 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
// Loop over configuration types and set per-configuration info.
for(std::vector<std::string>::iterator i =
m_CurrentConfigurationTypes.begin();
i != m_CurrentConfigurationTypes.end(); ++i)
this->CurrentConfigurationTypes.begin();
i != this->CurrentConfigurationTypes.end(); ++i)
{
// Get the current configuration name.
const char* configName = i->c_str();
@ -1736,7 +1736,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
std::vector<cmStdString> libNames;
std::vector<cmStdString> libDirs;
std::vector<cmStdString> fullPathLibs;
m_CurrentLocalGenerator->ComputeLinkInformation(*cmtarget, configName,
this->CurrentLocalGenerator->ComputeLinkInformation(*cmtarget, configName,
libNames, libDirs,
&fullPathLibs);
@ -1754,7 +1754,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
{
if(libDir->size() && *libDir != "/usr/lib")
{
if(m_XcodeVersion > 15)
if(this->XcodeVersion > 15)
{
// now add the same one but append $(CONFIGURATION) to it:
linkDirs += " ";
@ -1804,9 +1804,9 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
{
cmSourceFile file;
file.SetName("Info",
m_CurrentMakefile->GetCurrentOutputDirectory(),
this->CurrentMakefile->GetCurrentOutputDirectory(),
"plist", false);
cmtarget.GetSourceFiles().push_back(m_CurrentMakefile->AddSource(file));
cmtarget.GetSourceFiles().push_back(this->CurrentMakefile->AddSource(file));
}
std::vector<cmSourceFile*> & classes = cmtarget.GetSourceFiles();
@ -1819,7 +1819,7 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
cmSourceGroup& sourceGroup =
mf->FindSourceGroup(source.c_str(), sourceGroups);
cmXCodeObject* pbxgroup = this->CreateOrGetPBXGroup(cmtarget, &sourceGroup);
m_GroupMap[sf] = pbxgroup;
this->GroupMap[sf] = pbxgroup;
}
}
}
@ -1831,31 +1831,31 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(cmTarget& cmtarget,
cmStdString s = cmtarget.GetName();
s += "/";
s += sg->GetName();
std::map<cmStdString, cmXCodeObject* >::iterator i = m_GroupNameMap.find(s);
if(i != m_GroupNameMap.end())
std::map<cmStdString, cmXCodeObject* >::iterator i = this->GroupNameMap.find(s);
if(i != this->GroupNameMap.end())
{
return i->second;
}
i = m_TargetGroup.find(cmtarget.GetName());
i = this->TargetGroup.find(cmtarget.GetName());
cmXCodeObject* tgroup = 0;
if(i != m_TargetGroup.end())
if(i != this->TargetGroup.end())
{
tgroup = i->second;
}
else
{
tgroup = this->CreateObject(cmXCodeObject::PBXGroup);
m_TargetGroup[cmtarget.GetName()] = tgroup;
this->TargetGroup[cmtarget.GetName()] = tgroup;
cmXCodeObject* tgroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
tgroup->AddAttribute("name", this->CreateString(cmtarget.GetName()));
tgroup->AddAttribute("children", tgroupChildren);
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
tgroup->AddAttribute("refType", this->CreateString("4"));
}
tgroup->AddAttribute("sourceTree", this->CreateString("<group>"));
m_SourcesGroupChildren->AddObject(tgroup);
this->SourcesGroupChildren->AddObject(tgroup);
}
cmXCodeObject* tgroupChildren = tgroup->GetObject("children");
@ -1864,13 +1864,13 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(cmTarget& cmtarget,
this->CreateObject(cmXCodeObject::OBJECT_LIST);
group->AddAttribute("name", this->CreateString(sg->GetName()));
group->AddAttribute("children", groupChildren);
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
group->AddAttribute("refType", this->CreateString("4"));
}
group->AddAttribute("sourceTree", this->CreateString("<group>"));
tgroupChildren->AddObject(group);
m_GroupNameMap[s] = group;
this->GroupNameMap[s] = group;
return group;
}
@ -1881,14 +1881,14 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
)
{
this->ClearXCodeObjects();
m_RootObject = 0;
m_SourcesGroupChildren = 0;
m_MainGroupChildren = 0;
this->RootObject = 0;
this->SourcesGroupChildren = 0;
this->MainGroupChildren = 0;
cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
cmXCodeObject* developBuildStyle =
this->CreateObject(cmXCodeObject::PBXBuildStyle);
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
developBuildStyle->AddAttribute("name", this->CreateString("Development"));
}
@ -1903,7 +1903,7 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("YES"));
cmXCodeObject* deployBuildStyle =
this->CreateObject(cmXCodeObject::PBXBuildStyle);
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
deployBuildStyle->AddAttribute("name", this->CreateString("Deployment"));
}
@ -1919,32 +1919,32 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
listObjs->AddObject(developBuildStyle);
listObjs->AddObject(deployBuildStyle);
cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup);
m_MainGroupChildren =
this->MainGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
mainGroup->AddAttribute("children", m_MainGroupChildren);
if(m_XcodeVersion == 15)
mainGroup->AddAttribute("children", this->MainGroupChildren);
if(this->XcodeVersion == 15)
{
mainGroup->AddAttribute("refType", this->CreateString("4"));
}
mainGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
cmXCodeObject* sourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup);
m_SourcesGroupChildren =
this->SourcesGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
sourcesGroup->AddAttribute("name", this->CreateString("Sources"));
sourcesGroup->AddAttribute("children", m_SourcesGroupChildren);
if(m_XcodeVersion == 15)
sourcesGroup->AddAttribute("children", this->SourcesGroupChildren);
if(this->XcodeVersion == 15)
{
sourcesGroup->AddAttribute("refType", this->CreateString("4"));
}
sourcesGroup->AddAttribute("sourceTree", this->CreateString("<group>"));
m_MainGroupChildren->AddObject(sourcesGroup);
this->MainGroupChildren->AddObject(sourcesGroup);
// now create the cmake groups
this->CreateGroups(root, generators);
cmXCodeObject* productGroup = this->CreateObject(cmXCodeObject::PBXGroup);
productGroup->AddAttribute("name", this->CreateString("Products"));
if(m_XcodeVersion == 15)
if(this->XcodeVersion == 15)
{
productGroup->AddAttribute("refType", this->CreateString("4"));
}
@ -1952,17 +1952,17 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
cmXCodeObject* productGroupChildren =
this->CreateObject(cmXCodeObject::OBJECT_LIST);
productGroup->AddAttribute("children", productGroupChildren);
m_MainGroupChildren->AddObject(productGroup);
this->MainGroupChildren->AddObject(productGroup);
m_RootObject = this->CreateObject(cmXCodeObject::PBXProject);
m_RootObject->SetComment("Project object");
this->RootObject = this->CreateObject(cmXCodeObject::PBXProject);
this->RootObject->SetComment("Project object");
group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
m_RootObject->AddAttribute("mainGroup",
this->RootObject->AddAttribute("mainGroup",
this->CreateObjectReference(mainGroup));
m_RootObject->AddAttribute("buildSettings", group);
m_RootObject->AddAttribute("buildStyles", listObjs);
m_RootObject->AddAttribute("hasScannedForEncodings",
this->RootObject->AddAttribute("buildSettings", group);
this->RootObject->AddAttribute("buildStyles", listObjs);
this->RootObject->AddAttribute("hasScannedForEncodings",
this->CreateString("0"));
cmXCodeObject* configlist = this->CreateObject(cmXCodeObject::XCConfigurationList);
cmXCodeObject* configDebug = this->CreateObject(cmXCodeObject::XCBuildConfiguration);
@ -1974,7 +1974,7 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
configlist->AddAttribute("buildConfigurations", buildConfigurations);
std::string comment = "Build configuration list for PBXProject ";
comment += " \"";
comment += m_CurrentProject;
comment += this->CurrentProject;
comment += "\"";
configlist->SetComment(comment.c_str());
configlist->AddAttribute("defaultConfigurationIsVisible", this->CreateString("0"));
@ -1986,7 +1986,7 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
configRelease->AddAttribute("name", this->CreateString("Release"));
configRelease->AddAttribute("buildSettings", buildSettings);
m_RootObject->AddAttribute("buildConfigurationList",
this->RootObject->AddAttribute("buildConfigurationList",
this->CreateObjectReference(configlist));
std::vector<cmXCodeObject*> targets;
@ -2020,7 +2020,7 @@ void cmGlobalXCodeGenerator::CreateXCodeObjects(cmLocalGenerator* root,
productGroupChildren->AddObject(productRef->GetObject());
}
}
m_RootObject->AddAttribute("targets", allTargets);
this->RootObject->AddAttribute("targets", allTargets);
}
@ -2029,11 +2029,11 @@ void
cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
std::vector<cmXCodeObject*>& targets)
{
cmGeneratedFileStream makefileStream(m_CurrentXCodeHackMakefile.c_str());
cmGeneratedFileStream makefileStream(this->CurrentXCodeHackMakefile.c_str());
if(!makefileStream)
{
cmSystemTools::Error("Could not create",
m_CurrentXCodeHackMakefile.c_str());
this->CurrentXCodeHackMakefile.c_str());
return;
}
makefileStream.SetCopyIfDifferent(true);
@ -2044,10 +2044,10 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
makefileStream
<< "# up-to-date with anything they link to,avoiding a bug in XCode 1.5\n";
for(std::vector<std::string>::const_iterator
ct = m_CurrentConfigurationTypes.begin();
ct != m_CurrentConfigurationTypes.end(); ++ct)
ct = this->CurrentConfigurationTypes.begin();
ct != this->CurrentConfigurationTypes.end(); ++ct)
{
if(m_XcodeVersion < 21 || ct->empty())
if(this->XcodeVersion < 21 || ct->empty())
{
makefileStream << "all: ";
}
@ -2108,8 +2108,8 @@ cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
"# link. This forces Xcode to relink the targets from scratch. It\n"
"# does not seem to check these dependencies itself.\n";
for(std::vector<std::string>::const_iterator
ct = m_CurrentConfigurationTypes.begin();
ct != m_CurrentConfigurationTypes.end(); ++ct)
ct = this->CurrentConfigurationTypes.begin();
ct != this->CurrentConfigurationTypes.end(); ++ct)
{
const char* configName = 0;
if(!ct->empty())
@ -2242,7 +2242,7 @@ cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root,
xcodeDir += "/";
xcodeDir += root->GetMakefile()->GetProjectName();
xcodeDir += ".xcode";
if(m_XcodeVersion > 20)
if(this->XcodeVersion > 20)
{
xcodeDir += "proj";
}
@ -2274,9 +2274,9 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
fout << "};\n";
cmXCodeObject::Indent(1, fout);
fout << "objectVersion = 39;\n";
cmXCodeObject::PrintList(m_XCodeObjects, fout);
cmXCodeObject::PrintList(this->XCodeObjects, fout);
cmXCodeObject::Indent(1, fout);
fout << "rootObject = " << m_RootObject->GetId() << ";\n";
fout << "rootObject = " << this->RootObject->GetId() << ";\n";
fout << "}\n";
}
@ -2292,14 +2292,14 @@ void cmGlobalXCodeGenerator::GetDocumentation(cmDocumentationEntry& entry)
//----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p)
{
if ( !m_CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") )
if ( !this->CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") )
{
return cmSystemTools::ConvertToOutputPath(p);
}
else
{
std::string ret =
this->ConvertToRelativePath(m_CurrentOutputDirectoryComponents, p);
this->ConvertToRelativePath(this->CurrentOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
}
}
@ -2307,14 +2307,14 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p)
//----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator::ConvertToRelativeForXCode(const char* p)
{
if ( !m_CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") )
if ( !this->CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") )
{
return cmSystemTools::ConvertToOutputPath(p);
}
else
{
std::string ret =
this->ConvertToRelativePath(m_ProjectOutputDirectoryComponents, p);
this->ConvertToRelativePath(this->ProjectOutputDirectoryComponents, p);
return cmSystemTools::ConvertToOutputPath(ret.c_str());
}
}
@ -2340,7 +2340,7 @@ cmGlobalXCodeGenerator
const char* suffix,
std::string& dir)
{
if(m_XcodeVersion > 20)
if(this->XcodeVersion > 20)
{
if(config)
{

View File

@ -36,7 +36,7 @@ public:
cmGlobalXCodeGenerator();
static cmGlobalGenerator* New();
void SetVersion(int v) { m_XcodeVersion = v;}
void SetVersion(int v) { this->XcodeVersion = v;}
///! Get the name for the generator.
virtual const char* GetName() const {
return cmGlobalXCodeGenerator::GetActualName();}
@ -104,7 +104,7 @@ private:
const char* commandFileName);
cmXCodeObject* FindXCodeTarget(cmTarget*);
// create cmXCodeObject from these functions so that memory can be managed
// correctly. All objects created are stored in m_XCodeObjects.
// correctly. All objects created are stored in this->XCodeObjects.
cmXCodeObject* CreateObject(cmXCodeObject::PBXType ptype);
cmXCodeObject* CreateObject(cmXCodeObject::Type type);
cmXCodeObject* CreateString(const char* s);
@ -126,7 +126,7 @@ private:
std::string& projectName,
const char* buildType);
std::string ExtractFlag(const char* flag, std::string& flags);
// delete all objects in the m_XCodeObjects vector.
// delete all objects in the this->XCodeObjects vector.
void ClearXCodeObjects();
void CreateXCodeObjects(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
@ -160,27 +160,27 @@ protected:
virtual const char* GetInstallTargetName() { return "install"; }
virtual const char* GetPackageTargetName() { return "package"; }
int m_XcodeVersion;
std::vector<cmXCodeObject*> m_XCodeObjects;
cmXCodeObject* m_RootObject;
int XcodeVersion;
std::vector<cmXCodeObject*> XCodeObjects;
cmXCodeObject* RootObject;
private:
cmXCodeObject* m_MainGroupChildren;
cmXCodeObject* m_SourcesGroupChildren;
cmMakefile* m_CurrentMakefile;
cmLocalGenerator* m_CurrentLocalGenerator;
std::vector<std::string> m_CurrentConfigurationTypes;
std::string m_CurrentReRunCMakeMakefile;
std::string m_CurrentXCodeHackMakefile;
std::string m_CurrentProject;
std::string m_OutputDir;
std::string m_LibraryOutputPath;
std::string m_ExecutableOutputPath;
std::set<cmStdString> m_TargetDoneSet;
std::vector<std::string> m_CurrentOutputDirectoryComponents;
std::vector<std::string> m_ProjectOutputDirectoryComponents;
std::map<cmSourceFile*, cmXCodeObject* > m_GroupMap;
std::map<cmStdString, cmXCodeObject* > m_GroupNameMap;
std::map<cmStdString, cmXCodeObject* > m_TargetGroup;
cmXCodeObject* MainGroupChildren;
cmXCodeObject* SourcesGroupChildren;
cmMakefile* CurrentMakefile;
cmLocalGenerator* CurrentLocalGenerator;
std::vector<std::string> CurrentConfigurationTypes;
std::string CurrentReRunCMakeMakefile;
std::string CurrentXCodeHackMakefile;
std::string CurrentProject;
std::string OutputDir;
std::string LibraryOutputPath;
std::string ExecutableOutputPath;
std::set<cmStdString> TargetDoneSet;
std::vector<std::string> CurrentOutputDirectoryComponents;
std::vector<std::string> ProjectOutputDirectoryComponents;
std::map<cmSourceFile*, cmXCodeObject* > GroupMap;
std::map<cmStdString, cmXCodeObject* > GroupNameMap;
std::map<cmStdString, cmXCodeObject* > TargetGroup;
};
#endif

View File

@ -22,25 +22,25 @@
bool cmIfFunctionBlocker::
IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
{
const char* name = lff.m_Name.c_str();
const std::vector<cmListFileArgument>& args = lff.m_Arguments;
const char* name = lff.Name.c_str();
const std::vector<cmListFileArgument>& args = lff.Arguments;
// always let if statements through
if (cmSystemTools::LowerCase(lff.m_Name) == "if")
if (cmSystemTools::LowerCase(lff.Name) == "if")
{
return false;
}
// watch for our ELSE or ENDIF
if (cmSystemTools::LowerCase(lff.m_Name) == "else" ||
cmSystemTools::LowerCase(lff.m_Name) == "endif")
if (cmSystemTools::LowerCase(lff.Name) == "else" ||
cmSystemTools::LowerCase(lff.Name) == "endif")
{
if (args == m_Args)
if (args == this->Args)
{
// if it was an else statement then we should change state
// and block this Else Command
if (cmSystemTools::LowerCase(lff.m_Name) == "else")
if (cmSystemTools::LowerCase(lff.Name) == "else")
{
m_IsBlocking = !m_IsBlocking;
this->IsBlocking = !this->IsBlocking;
return true;
}
// otherwise it must be an ENDIF statement, in that case remove the
@ -55,8 +55,8 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
err += ". Did you mean ";
err += name;
err += "( ";
for(std::vector<cmListFileArgument>::const_iterator a = m_Args.begin();
a != m_Args.end();++a)
for(std::vector<cmListFileArgument>::const_iterator a = this->Args.begin();
a != this->Args.end();++a)
{
err += (a->Quoted?"\"":"");
err += a->Value;
@ -67,15 +67,15 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf)
cmSystemTools::Error(err.c_str());
}
}
return m_IsBlocking;
return this->IsBlocking;
}
bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff,
cmMakefile&)
{
if (cmSystemTools::LowerCase(lff.m_Name) == "endif")
if (cmSystemTools::LowerCase(lff.Name) == "endif")
{
if (lff.m_Arguments == m_Args)
if (lff.Arguments == this->Args)
{
return true;
}
@ -89,8 +89,8 @@ ScopeEnded(cmMakefile &mf)
std::string errmsg = "The end of a CMakeLists file was reached with an IF statement that was not closed properly.\nWithin the directory: ";
errmsg += mf.GetCurrentDirectory();
errmsg += "\nThe arguments are: ";
for(std::vector<cmListFileArgument>::const_iterator j = m_Args.begin();
j != m_Args.end(); ++j)
for(std::vector<cmListFileArgument>::const_iterator j = this->Args.begin();
j != this->Args.end(); ++j)
{
errmsg += (j->Quoted?"\"":"");
errmsg += j->Value;
@ -105,8 +105,8 @@ bool cmIfCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args)
char* errorString = 0;
std::vector<std::string> expandedArguments;
m_Makefile->ExpandArguments(args, expandedArguments);
bool isTrue = cmIfCommand::IsTrue(expandedArguments,&errorString,m_Makefile);
this->Makefile->ExpandArguments(args, expandedArguments);
bool isTrue = cmIfCommand::IsTrue(expandedArguments,&errorString,this->Makefile);
if (errorString)
{
@ -129,9 +129,9 @@ bool cmIfCommand::InvokeInitialPass(const std::vector<cmListFileArgument>& args)
cmIfFunctionBlocker *f = new cmIfFunctionBlocker();
// if is isn't true block the commands
f->m_IsBlocking = !isTrue;
f->m_Args = args;
m_Makefile->AddFunctionBlocker(f);
f->IsBlocking = !isTrue;
f->Args = args;
this->Makefile->AddFunctionBlocker(f);
return true;
}

View File

@ -36,8 +36,8 @@ public:
cmMakefile &mf);
virtual void ScopeEnded(cmMakefile &mf);
std::vector<cmListFileArgument> m_Args;
bool m_IsBlocking;
std::vector<cmListFileArgument> Args;
bool IsBlocking;
};
/** \class cmIfCommand

View File

@ -40,13 +40,13 @@ bool cmIncludeCommand::InitialPass(std::vector<std::string> const& args)
// Not a path. Maybe module.
std::string module = fname;
module += ".cmake";
std::string mfile = m_Makefile->GetModulesFile(module.c_str());
std::string mfile = this->Makefile->GetModulesFile(module.c_str());
if ( mfile.size() )
{
fname = mfile.c_str();
}
}
bool readit = m_Makefile->ReadListFile( m_Makefile->GetCurrentListFile(),
bool readit = this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(),
fname.c_str() );
if(!optional && !readit && !cmSystemTools::GetFatalErrorOccured())
{

Some files were not shown because too many files have changed in this diff Show More