mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 12:09:48 +00:00
Use C++11 nullptr (cont.)
Fix remaining occurrences of the issue addressed in commit 5962db4389
(Use C++11 nullptr, 2017-08-22) that are only showing up on macOS.
Signed-off-by: Matthias Maennich <matthias@maennich.net>
This commit is contained in:
parent
a1cdf537ff
commit
a5279ae553
@ -34,7 +34,7 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
fileName = CFSTR("RuntimeScript");
|
fileName = CFSTR("RuntimeScript");
|
||||||
if (!(scriptFileURL =
|
if (!(scriptFileURL =
|
||||||
CFBundleCopyResourceURL(appBundle, fileName, NULL, NULL))) {
|
CFBundleCopyResourceURL(appBundle, fileName, nullptr, nullptr))) {
|
||||||
DebugError("CFBundleCopyResourceURL failed");
|
DebugError("CFBundleCopyResourceURL failed");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -71,7 +71,7 @@ int main(int argc, char* argv[])
|
|||||||
for (cc = 1; cc < argc; ++cc) {
|
for (cc = 1; cc < argc; ++cc) {
|
||||||
args.push_back(argv[cc]);
|
args.push_back(argv[cc]);
|
||||||
}
|
}
|
||||||
args.push_back(0);
|
args.push_back(nullptr);
|
||||||
|
|
||||||
cmsysProcess* cp = cmsysProcess_New();
|
cmsysProcess* cp = cmsysProcess_New();
|
||||||
cmsysProcess_SetCommand(cp, &*args.begin());
|
cmsysProcess_SetCommand(cp, &*args.begin());
|
||||||
@ -83,7 +83,7 @@ int main(int argc, char* argv[])
|
|||||||
std::vector<char> tempOutput;
|
std::vector<char> tempOutput;
|
||||||
char* data;
|
char* data;
|
||||||
int length;
|
int length;
|
||||||
while (cmsysProcess_WaitForData(cp, &data, &length, 0)) {
|
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||||
// Translate NULL characters in the output into valid text.
|
// Translate NULL characters in the output into valid text.
|
||||||
for (int i = 0; i < length; ++i) {
|
for (int i = 0; i < length; ++i) {
|
||||||
if (data[i] == '\0') {
|
if (data[i] == '\0') {
|
||||||
@ -93,7 +93,7 @@ int main(int argc, char* argv[])
|
|||||||
std::cout.write(data, length);
|
std::cout.write(data, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmsysProcess_WaitForExit(cp, 0);
|
cmsysProcess_WaitForExit(cp, nullptr);
|
||||||
|
|
||||||
bool result = true;
|
bool result = true;
|
||||||
if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
|
if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
|
||||||
|
@ -19,7 +19,7 @@ cmCPackBundleGenerator::~cmCPackBundleGenerator()
|
|||||||
int cmCPackBundleGenerator::InitializeInternal()
|
int cmCPackBundleGenerator::InitializeInternal()
|
||||||
{
|
{
|
||||||
const char* name = this->GetOption("CPACK_BUNDLE_NAME");
|
const char* name = this->GetOption("CPACK_BUNDLE_NAME");
|
||||||
if (0 == name) {
|
if (nullptr == name) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"CPACK_BUNDLE_NAME must be set to use the Bundle generator."
|
"CPACK_BUNDLE_NAME must be set to use the Bundle generator."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
|
@ -242,9 +242,9 @@ bool cmCPackDragNDropGenerator::RunCommand(std::ostringstream& command,
|
|||||||
{
|
{
|
||||||
int exit_code = 1;
|
int exit_code = 1;
|
||||||
|
|
||||||
bool result =
|
bool result = cmSystemTools::RunSingleCommand(command.str().c_str(), output,
|
||||||
cmSystemTools::RunSingleCommand(command.str().c_str(), output, output,
|
output, &exit_code, nullptr,
|
||||||
&exit_code, 0, this->GeneratorVerbose, 0);
|
this->GeneratorVerbose, 0);
|
||||||
|
|
||||||
if (!result || exit_code) {
|
if (!result || exit_code) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error executing: " << command.str()
|
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error executing: " << command.str()
|
||||||
@ -553,10 +553,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
header_data.push_back(languages.size());
|
header_data.push_back(languages.size());
|
||||||
for (size_t i = 0; i < languages.size(); ++i) {
|
for (size_t i = 0; i < languages.size(); ++i) {
|
||||||
CFStringRef language_cfstring = CFStringCreateWithCString(
|
CFStringRef language_cfstring = CFStringCreateWithCString(
|
||||||
NULL, languages[i].c_str(), kCFStringEncodingUTF8);
|
nullptr, languages[i].c_str(), kCFStringEncodingUTF8);
|
||||||
CFStringRef iso_language =
|
CFStringRef iso_language =
|
||||||
CFLocaleCreateCanonicalLanguageIdentifierFromString(
|
CFLocaleCreateCanonicalLanguageIdentifierFromString(
|
||||||
NULL, language_cfstring);
|
nullptr, language_cfstring);
|
||||||
if (!iso_language) {
|
if (!iso_language) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
|
cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
|
||||||
<< " is not a recognized language" << std::endl);
|
<< " is not a recognized language" << std::endl);
|
||||||
|
@ -154,9 +154,9 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
int numTries = 10;
|
int numTries = 10;
|
||||||
bool res = false;
|
bool res = false;
|
||||||
while (numTries > 0) {
|
while (numTries > 0) {
|
||||||
res =
|
res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output,
|
||||||
cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, &output,
|
&output, &retVal, nullptr,
|
||||||
&retVal, 0, this->GeneratorVerbose, 0);
|
this->GeneratorVerbose, 0);
|
||||||
if (res && !retVal) {
|
if (res && !retVal) {
|
||||||
numTries = -1;
|
numTries = -1;
|
||||||
break;
|
break;
|
||||||
|
@ -70,7 +70,7 @@ void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
|
|||||||
std::map<std::string, cmCPackComponentGroup>::iterator groupIt;
|
std::map<std::string, cmCPackComponentGroup>::iterator groupIt;
|
||||||
for (groupIt = this->ComponentGroups.begin();
|
for (groupIt = this->ComponentGroups.begin();
|
||||||
groupIt != this->ComponentGroups.end(); ++groupIt) {
|
groupIt != this->ComponentGroups.end(); ++groupIt) {
|
||||||
if (groupIt->second.ParentGroup == 0) {
|
if (groupIt->second.ParentGroup == nullptr) {
|
||||||
CreateChoiceOutline(groupIt->second, xout);
|
CreateChoiceOutline(groupIt->second, xout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,9 +294,9 @@ int cmCPackPackageMakerGenerator::PackageFiles()
|
|||||||
int numTries = 10;
|
int numTries = 10;
|
||||||
bool res = false;
|
bool res = false;
|
||||||
while (numTries > 0) {
|
while (numTries > 0) {
|
||||||
res =
|
res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output,
|
||||||
cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, &output,
|
&output, &retVal, nullptr,
|
||||||
&retVal, 0, this->GeneratorVerbose, 0);
|
this->GeneratorVerbose, 0);
|
||||||
if (res && !retVal) {
|
if (res && !retVal) {
|
||||||
numTries = -1;
|
numTries = -1;
|
||||||
break;
|
break;
|
||||||
@ -466,7 +466,7 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char* command,
|
|||||||
std::string output;
|
std::string output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
bool res = cmSystemTools::RunSingleCommand(
|
bool res = cmSystemTools::RunSingleCommand(
|
||||||
command, &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
|
command, &output, &output, &retVal, nullptr, this->GeneratorVerbose, 0);
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker"
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
if (!res || retVal) {
|
if (!res || retVal) {
|
||||||
|
@ -54,7 +54,7 @@ int cmCPackProductBuildGenerator::PackageFiles()
|
|||||||
} else {
|
} else {
|
||||||
if (!this->GenerateComponentPackage(basePackageDir,
|
if (!this->GenerateComponentPackage(basePackageDir,
|
||||||
this->GetOption("CPACK_PACKAGE_NAME"),
|
this->GetOption("CPACK_PACKAGE_NAME"),
|
||||||
toplevel, NULL)) {
|
toplevel, nullptr)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,9 +145,9 @@ bool cmCPackProductBuildGenerator::RunProductBuild(const std::string& command)
|
|||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << command << std::endl);
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << command << std::endl);
|
||||||
std::string output, error_output;
|
std::string output, error_output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
bool res =
|
bool res = cmSystemTools::RunSingleCommand(command.c_str(), &output,
|
||||||
cmSystemTools::RunSingleCommand(command.c_str(), &output, &error_output,
|
&error_output, &retVal, nullptr,
|
||||||
&retVal, 0, this->GeneratorVerbose, 0);
|
this->GeneratorVerbose, 0);
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running command" << std::endl);
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running command" << std::endl);
|
||||||
if (!res || retVal) {
|
if (!res || retVal) {
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
@ -174,7 +174,7 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
|
|||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
|
||||||
<< packageFile << std::endl);
|
<< packageFile << std::endl);
|
||||||
|
|
||||||
const char* comp_name = component ? component->Name.c_str() : NULL;
|
const char* comp_name = component ? component->Name.c_str() : nullptr;
|
||||||
|
|
||||||
const char* preflight = this->GetComponentScript("PREFLIGHT", comp_name);
|
const char* preflight = this->GetComponentScript("PREFLIGHT", comp_name);
|
||||||
const char* postflight = this->GetComponentScript("POSTFLIGHT", comp_name);
|
const char* postflight = this->GetComponentScript("POSTFLIGHT", comp_name);
|
||||||
|
@ -229,7 +229,7 @@ std::string cmFindProgramCommand::GetBundleExecutable(
|
|||||||
// returned executableURL is relative to <appbundle>/Contents/MacOS/
|
// returned executableURL is relative to <appbundle>/Contents/MacOS/
|
||||||
CFURLRef executableURL = CFBundleCopyExecutableURL(appBundle);
|
CFURLRef executableURL = CFBundleCopyExecutableURL(appBundle);
|
||||||
|
|
||||||
if (executableURL != NULL) {
|
if (executableURL != nullptr) {
|
||||||
const int MAX_OSX_PATH_SIZE = 1024;
|
const int MAX_OSX_PATH_SIZE = 1024;
|
||||||
char buffer[MAX_OSX_PATH_SIZE];
|
char buffer[MAX_OSX_PATH_SIZE];
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class cmGlobalXCodeGenerator::BuildObjectListOrString
|
|||||||
public:
|
public:
|
||||||
BuildObjectListOrString(cmGlobalXCodeGenerator* gen, bool buildObjectList)
|
BuildObjectListOrString(cmGlobalXCodeGenerator* gen, bool buildObjectList)
|
||||||
: Generator(gen)
|
: Generator(gen)
|
||||||
, Group(0)
|
, Group(nullptr)
|
||||||
, Empty(true)
|
, Empty(true)
|
||||||
{
|
{
|
||||||
if (buildObjectList) {
|
if (buildObjectList) {
|
||||||
@ -140,10 +140,10 @@ cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(
|
|||||||
this->VersionString = version_string;
|
this->VersionString = version_string;
|
||||||
this->XcodeVersion = version_number;
|
this->XcodeVersion = version_number;
|
||||||
|
|
||||||
this->RootObject = 0;
|
this->RootObject = nullptr;
|
||||||
this->MainGroupChildren = 0;
|
this->MainGroupChildren = nullptr;
|
||||||
this->CurrentMakefile = 0;
|
this->CurrentMakefile = nullptr;
|
||||||
this->CurrentLocalGenerator = 0;
|
this->CurrentLocalGenerator = nullptr;
|
||||||
this->XcodeBuildCommandInitialized = false;
|
this->XcodeBuildCommandInitialized = false;
|
||||||
|
|
||||||
this->ObjectDirArchDefault = "$(CURRENT_ARCH)";
|
this->ObjectDirArchDefault = "$(CURRENT_ARCH)";
|
||||||
@ -161,15 +161,16 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
|
|||||||
const std::string& name, cmake* cm) const
|
const std::string& name, cmake* cm) const
|
||||||
{
|
{
|
||||||
if (name != GetActualName())
|
if (name != GetActualName())
|
||||||
return 0;
|
return nullptr;
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
cmXcodeVersionParser parser;
|
cmXcodeVersionParser parser;
|
||||||
std::string versionFile;
|
std::string versionFile;
|
||||||
{
|
{
|
||||||
std::string out;
|
std::string out;
|
||||||
std::string::size_type pos;
|
std::string::size_type pos;
|
||||||
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out, 0,
|
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out,
|
||||||
0, 0, cmSystemTools::OUTPUT_NONE) &&
|
nullptr, nullptr, nullptr,
|
||||||
|
cmSystemTools::OUTPUT_NONE) &&
|
||||||
(pos = out.find(".app/"), pos != std::string::npos)) {
|
(pos = out.find(".app/"), pos != std::string::npos)) {
|
||||||
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
|
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
|
||||||
}
|
}
|
||||||
@ -391,7 +392,7 @@ void cmGlobalXCodeGenerator::AddExtraTargets(
|
|||||||
cmMakefile* mf = root->GetMakefile();
|
cmMakefile* mf = root->GetMakefile();
|
||||||
|
|
||||||
// Add ALL_BUILD
|
// Add ALL_BUILD
|
||||||
const char* no_working_directory = 0;
|
const char* no_working_directory = nullptr;
|
||||||
std::vector<std::string> no_depends;
|
std::vector<std::string> no_depends;
|
||||||
cmTarget* allbuild =
|
cmTarget* allbuild =
|
||||||
mf->AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_directory,
|
mf->AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_directory,
|
||||||
@ -1018,7 +1019,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
|
|||||||
}
|
}
|
||||||
std::string const& obj = (*oi)->GetFullPath();
|
std::string const& obj = (*oi)->GetFullPath();
|
||||||
cmXCodeObject* xsf =
|
cmXCodeObject* xsf =
|
||||||
this->CreateXCodeSourceFileFromPath(obj, gtgt, "", 0);
|
this->CreateXCodeSourceFileFromPath(obj, gtgt, "", nullptr);
|
||||||
externalObjFiles.push_back(xsf);
|
externalObjFiles.push_back(xsf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1028,10 +1029,10 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
|
|||||||
bool isBundleTarget = gtgt->GetPropertyAsBool("MACOSX_BUNDLE");
|
bool isBundleTarget = gtgt->GetPropertyAsBool("MACOSX_BUNDLE");
|
||||||
bool isCFBundleTarget = gtgt->IsCFBundleOnApple();
|
bool isCFBundleTarget = gtgt->IsCFBundleOnApple();
|
||||||
|
|
||||||
cmXCodeObject* buildFiles = 0;
|
cmXCodeObject* buildFiles = nullptr;
|
||||||
|
|
||||||
// create source build phase
|
// create source build phase
|
||||||
cmXCodeObject* sourceBuildPhase = 0;
|
cmXCodeObject* sourceBuildPhase = nullptr;
|
||||||
if (!sourceFiles.empty()) {
|
if (!sourceFiles.empty()) {
|
||||||
sourceBuildPhase =
|
sourceBuildPhase =
|
||||||
this->CreateObject(cmXCodeObject::PBXSourcesBuildPhase);
|
this->CreateObject(cmXCodeObject::PBXSourcesBuildPhase);
|
||||||
@ -1049,7 +1050,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create header build phase - only for framework targets
|
// create header build phase - only for framework targets
|
||||||
cmXCodeObject* headerBuildPhase = 0;
|
cmXCodeObject* headerBuildPhase = nullptr;
|
||||||
if (!headerFiles.empty() && isFrameworkTarget) {
|
if (!headerFiles.empty() && isFrameworkTarget) {
|
||||||
headerBuildPhase =
|
headerBuildPhase =
|
||||||
this->CreateObject(cmXCodeObject::PBXHeadersBuildPhase);
|
this->CreateObject(cmXCodeObject::PBXHeadersBuildPhase);
|
||||||
@ -1067,7 +1068,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create resource build phase - only for framework or bundle targets
|
// create resource build phase - only for framework or bundle targets
|
||||||
cmXCodeObject* resourceBuildPhase = 0;
|
cmXCodeObject* resourceBuildPhase = nullptr;
|
||||||
if (!resourceFiles.empty() &&
|
if (!resourceFiles.empty() &&
|
||||||
(isFrameworkTarget || isBundleTarget || isCFBundleTarget)) {
|
(isFrameworkTarget || isBundleTarget || isCFBundleTarget)) {
|
||||||
resourceBuildPhase =
|
resourceBuildPhase =
|
||||||
@ -1177,7 +1178,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create framework build phase
|
// create framework build phase
|
||||||
cmXCodeObject* frameworkBuildPhase = 0;
|
cmXCodeObject* frameworkBuildPhase = nullptr;
|
||||||
if (!externalObjFiles.empty()) {
|
if (!externalObjFiles.empty()) {
|
||||||
frameworkBuildPhase =
|
frameworkBuildPhase =
|
||||||
this->CreateObject(cmXCodeObject::PBXFrameworksBuildPhase);
|
this->CreateObject(cmXCodeObject::PBXFrameworksBuildPhase);
|
||||||
@ -1278,7 +1279,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateBuildPhase(
|
|||||||
const std::vector<cmCustomCommand>& commands)
|
const std::vector<cmCustomCommand>& commands)
|
||||||
{
|
{
|
||||||
if (commands.size() == 0 && strcmp(name, "CMake ReRun") != 0) {
|
if (commands.size() == 0 && strcmp(name, "CMake ReRun") != 0) {
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
cmXCodeObject* buildPhase =
|
cmXCodeObject* buildPhase =
|
||||||
this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
|
this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase);
|
||||||
@ -1754,8 +1755,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
|||||||
const char* version = gtgt->GetProperty("VERSION");
|
const char* version = gtgt->GetProperty("VERSION");
|
||||||
const char* soversion = gtgt->GetProperty("SOVERSION");
|
const char* soversion = gtgt->GetProperty("SOVERSION");
|
||||||
if (!gtgt->HasSOName(configName) || gtgt->IsFrameworkOnApple()) {
|
if (!gtgt->HasSOName(configName) || gtgt->IsFrameworkOnApple()) {
|
||||||
version = 0;
|
version = nullptr;
|
||||||
soversion = 0;
|
soversion = nullptr;
|
||||||
}
|
}
|
||||||
if (version && !soversion) {
|
if (version && !soversion) {
|
||||||
soversion = version;
|
soversion = version;
|
||||||
@ -2038,7 +2039,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
|||||||
|
|
||||||
bool same_gflags = true;
|
bool same_gflags = true;
|
||||||
std::map<std::string, std::string> gflags;
|
std::map<std::string, std::string> gflags;
|
||||||
std::string const* last_gflag = 0;
|
std::string const* last_gflag = nullptr;
|
||||||
std::string optLevel = "0";
|
std::string optLevel = "0";
|
||||||
|
|
||||||
// Minimal map of flags to build settings.
|
// Minimal map of flags to build settings.
|
||||||
@ -2108,7 +2109,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add Fortran source format attribute if property is set.
|
// Add Fortran source format attribute if property is set.
|
||||||
const char* format = 0;
|
const char* format = nullptr;
|
||||||
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
|
const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT");
|
||||||
switch (cmOutputConverter::GetFortranFormat(tgtfmt)) {
|
switch (cmOutputConverter::GetFortranFormat(tgtfmt)) {
|
||||||
case cmOutputConverter::FortranFormatFixed:
|
case cmOutputConverter::FortranFormatFixed:
|
||||||
@ -2268,8 +2269,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
|
|||||||
target->SetComment(gtgt->GetName());
|
target->SetComment(gtgt->GetName());
|
||||||
cmXCodeObject* buildPhases = this->CreateObject(cmXCodeObject::OBJECT_LIST);
|
cmXCodeObject* buildPhases = this->CreateObject(cmXCodeObject::OBJECT_LIST);
|
||||||
std::vector<cmXCodeObject*> emptyContentVector;
|
std::vector<cmXCodeObject*> emptyContentVector;
|
||||||
this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0,
|
this->CreateCustomCommands(buildPhases, nullptr, nullptr, nullptr,
|
||||||
gtgt);
|
emptyContentVector, nullptr, gtgt);
|
||||||
target->AddAttribute("buildPhases", buildPhases);
|
target->AddAttribute("buildPhases", buildPhases);
|
||||||
this->AddConfigurations(target, gtgt);
|
this->AddConfigurations(target, gtgt);
|
||||||
cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST);
|
cmXCodeObject* dependencies = this->CreateObject(cmXCodeObject::OBJECT_LIST);
|
||||||
@ -2283,7 +2284,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
|
|||||||
if (gtgt->GetType() == cmStateEnums::UTILITY) {
|
if (gtgt->GetType() == cmStateEnums::UTILITY) {
|
||||||
std::vector<cmSourceFile*> sources;
|
std::vector<cmSourceFile*> sources;
|
||||||
if (!gtgt->GetConfigCommonSourceFiles(sources)) {
|
if (!gtgt->GetConfigCommonSourceFiles(sources)) {
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::vector<cmSourceFile*>::const_iterator i = sources.begin();
|
for (std::vector<cmSourceFile*>::const_iterator i = sources.begin();
|
||||||
@ -2383,7 +2384,7 @@ const char* cmGlobalXCodeGenerator::GetTargetFileType(
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* cmGlobalXCodeGenerator::GetTargetProductType(
|
const char* cmGlobalXCodeGenerator::GetTargetProductType(
|
||||||
@ -2418,14 +2419,14 @@ const char* cmGlobalXCodeGenerator::GetTargetProductType(
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
|
cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
|
||||||
cmGeneratorTarget* gtgt, cmXCodeObject* buildPhases)
|
cmGeneratorTarget* gtgt, cmXCodeObject* buildPhases)
|
||||||
{
|
{
|
||||||
if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
|
if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXNativeTarget);
|
cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXNativeTarget);
|
||||||
target->AddAttribute("buildPhases", buildPhases);
|
target->AddAttribute("buildPhases", buildPhases);
|
||||||
@ -2469,13 +2470,13 @@ cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(
|
|||||||
cmGeneratorTarget const* t)
|
cmGeneratorTarget const* t)
|
||||||
{
|
{
|
||||||
if (!t) {
|
if (!t) {
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::map<cmGeneratorTarget const*, cmXCodeObject*>::const_iterator const i =
|
std::map<cmGeneratorTarget const*, cmXCodeObject*>::const_iterator const i =
|
||||||
this->XCodeObjectMap.find(t);
|
this->XCodeObjectMap.find(t);
|
||||||
if (i == this->XCodeObjectMap.end()) {
|
if (i == this->XCodeObjectMap.end()) {
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return i->second;
|
return i->second;
|
||||||
}
|
}
|
||||||
@ -2747,7 +2748,7 @@ bool cmGlobalXCodeGenerator::CreateGroups(
|
|||||||
cmXCodeObject* cmGlobalXCodeGenerator::CreatePBXGroup(cmXCodeObject* parent,
|
cmXCodeObject* cmGlobalXCodeGenerator::CreatePBXGroup(cmXCodeObject* parent,
|
||||||
std::string name)
|
std::string name)
|
||||||
{
|
{
|
||||||
cmXCodeObject* parentChildren = NULL;
|
cmXCodeObject* parentChildren = nullptr;
|
||||||
if (parent)
|
if (parent)
|
||||||
parentChildren = parent->GetObject("children");
|
parentChildren = parent->GetObject("children");
|
||||||
cmXCodeObject* group = this->CreateObject(cmXCodeObject::PBXGroup);
|
cmXCodeObject* group = this->CreateObject(cmXCodeObject::PBXGroup);
|
||||||
@ -2781,7 +2782,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(
|
|||||||
}
|
}
|
||||||
|
|
||||||
it = this->TargetGroup.find(target);
|
it = this->TargetGroup.find(target);
|
||||||
cmXCodeObject* tgroup = 0;
|
cmXCodeObject* tgroup = nullptr;
|
||||||
if (it != this->TargetGroup.end()) {
|
if (it != this->TargetGroup.end()) {
|
||||||
tgroup = it->second;
|
tgroup = it->second;
|
||||||
} else {
|
} else {
|
||||||
@ -2847,8 +2848,8 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
|
|||||||
cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators)
|
cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators)
|
||||||
{
|
{
|
||||||
this->ClearXCodeObjects();
|
this->ClearXCodeObjects();
|
||||||
this->RootObject = 0;
|
this->RootObject = nullptr;
|
||||||
this->MainGroupChildren = 0;
|
this->MainGroupChildren = nullptr;
|
||||||
cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
|
cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP);
|
||||||
group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
|
group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO"));
|
||||||
cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
|
cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST);
|
||||||
|
@ -36,7 +36,7 @@ public:
|
|||||||
virtual void GenerateInstallRules();
|
virtual void GenerateInstallRules();
|
||||||
virtual void ComputeObjectFilenames(
|
virtual void ComputeObjectFilenames(
|
||||||
std::map<cmSourceFile const*, std::string>& mapping,
|
std::map<cmSourceFile const*, std::string>& mapping,
|
||||||
cmGeneratorTarget const* gt = 0);
|
cmGeneratorTarget const* gt = nullptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
@ -283,7 +283,7 @@ bool cmMachOInternal::read_mach_o(uint32_t file_offset)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmMachOHeaderAndLoadCommands* f = NULL;
|
cmMachOHeaderAndLoadCommands* f = nullptr;
|
||||||
if (magic == MH_CIGAM || magic == MH_MAGIC) {
|
if (magic == MH_CIGAM || magic == MH_MAGIC) {
|
||||||
bool swap = false;
|
bool swap = false;
|
||||||
if (magic == MH_CIGAM) {
|
if (magic == MH_CIGAM) {
|
||||||
@ -313,7 +313,7 @@ bool cmMachOInternal::read_mach_o(uint32_t file_offset)
|
|||||||
// External class implementation.
|
// External class implementation.
|
||||||
|
|
||||||
cmMachO::cmMachO(const char* fname)
|
cmMachO::cmMachO(const char* fname)
|
||||||
: Internal(0)
|
: Internal(nullptr)
|
||||||
{
|
{
|
||||||
this->Internal = new cmMachOInternal(fname);
|
this->Internal = new cmMachOInternal(fname);
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,8 @@ cmXCodeObject::~cmXCodeObject()
|
|||||||
cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
|
cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
|
||||||
{
|
{
|
||||||
this->Version = 15;
|
this->Version = 15;
|
||||||
this->Target = 0;
|
this->Target = nullptr;
|
||||||
this->Object = 0;
|
this->Object = nullptr;
|
||||||
|
|
||||||
this->IsA = ptype;
|
this->IsA = ptype;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ cmXCodeObject::cmXCodeObject(PBXType ptype, Type type)
|
|||||||
|
|
||||||
this->TypeValue = type;
|
this->TypeValue = type;
|
||||||
if (this->TypeValue == OBJECT) {
|
if (this->TypeValue == OBJECT) {
|
||||||
this->AddAttribute("isa", 0);
|
this->AddAttribute("isa", nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ bool cmXCodeObject::IsEmpty() const
|
|||||||
return this->ObjectAttributes.empty();
|
return this->ObjectAttributes.empty();
|
||||||
case OBJECT_REF:
|
case OBJECT_REF:
|
||||||
case OBJECT:
|
case OBJECT:
|
||||||
return this->Object == 0;
|
return this->Object == nullptr;
|
||||||
}
|
}
|
||||||
return true; // unreachable, but quiets warnings
|
return true; // unreachable, but quiets warnings
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public:
|
|||||||
if (i != this->ObjectAttributes.end()) {
|
if (i != this->ObjectAttributes.end()) {
|
||||||
return i->second;
|
return i->second;
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
// search the attribute list for an object of the specified type
|
// search the attribute list for an object of the specified type
|
||||||
cmXCodeObject* GetObject(cmXCodeObject::PBXType t) const
|
cmXCodeObject* GetObject(cmXCodeObject::PBXType t) const
|
||||||
@ -126,7 +126,7 @@ public:
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CopyAttributes(cmXCodeObject*);
|
void CopyAttributes(cmXCodeObject*);
|
||||||
|
@ -47,7 +47,7 @@ int RunXCode(std::vector<const char*>& argv, bool& hitbug)
|
|||||||
}
|
}
|
||||||
pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err);
|
pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err);
|
||||||
}
|
}
|
||||||
cmsysProcess_WaitForExit(cp, 0);
|
cmsysProcess_WaitForExit(cp, nullptr);
|
||||||
if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
|
if (cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) {
|
||||||
return cmsysProcess_GetExitValue(cp);
|
return cmsysProcess_GetExitValue(cp);
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ int main(int ac, char* av[])
|
|||||||
for (int i = 1; i < ac; i++) {
|
for (int i = 1; i < ac; i++) {
|
||||||
argv.push_back(av[i]);
|
argv.push_back(av[i]);
|
||||||
}
|
}
|
||||||
argv.push_back(0);
|
argv.push_back(nullptr);
|
||||||
bool hitbug = true;
|
bool hitbug = true;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
while (hitbug) {
|
while (hitbug) {
|
||||||
|
Loading…
Reference in New Issue
Block a user