summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx168
1 files changed, 84 insertions, 84 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5e5ed2b..ceebf93 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -57,7 +57,7 @@ public:
cmTarget::cmTarget()
{
- this->Makefile = 0;
+ this->Makefile = CM_NULLPTR;
this->HaveInstallRule = false;
this->DLLPlatform = false;
this->IsAndroid = false;
@@ -97,64 +97,64 @@ void cmTarget::SetMakefile(cmMakefile* mf)
// Setup default property values.
if (this->GetType() != cmState::INTERFACE_LIBRARY &&
this->GetType() != cmState::UTILITY) {
- this->SetPropertyDefault("ANDROID_API", 0);
- this->SetPropertyDefault("ANDROID_API_MIN", 0);
- this->SetPropertyDefault("ANDROID_ARCH", 0);
- this->SetPropertyDefault("ANDROID_STL_TYPE", 0);
- this->SetPropertyDefault("ANDROID_SKIP_ANT_STEP", 0);
- this->SetPropertyDefault("ANDROID_PROCESS_MAX", 0);
- this->SetPropertyDefault("ANDROID_PROGUARD", 0);
- this->SetPropertyDefault("ANDROID_PROGUARD_CONFIG_PATH", 0);
- this->SetPropertyDefault("ANDROID_SECURE_PROPS_PATH", 0);
- this->SetPropertyDefault("ANDROID_NATIVE_LIB_DIRECTORIES", 0);
- this->SetPropertyDefault("ANDROID_NATIVE_LIB_DEPENDENCIES", 0);
- this->SetPropertyDefault("ANDROID_JAVA_SOURCE_DIR", 0);
- this->SetPropertyDefault("ANDROID_JAR_DIRECTORIES", 0);
- this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", 0);
- this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", 0);
- this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", 0);
- this->SetPropertyDefault("INSTALL_NAME_DIR", 0);
+ this->SetPropertyDefault("ANDROID_API", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_API_MIN", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_ARCH", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_STL_TYPE", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_SKIP_ANT_STEP", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_PROCESS_MAX", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_PROGUARD", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_PROGUARD_CONFIG_PATH", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_SECURE_PROPS_PATH", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_NATIVE_LIB_DIRECTORIES", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_NATIVE_LIB_DEPENDENCIES", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_JAVA_SOURCE_DIR", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_JAR_DIRECTORIES", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_JAR_DEPENDENCIES", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_ASSETS_DIRECTORIES", CM_NULLPTR);
+ this->SetPropertyDefault("ANDROID_ANT_ADDITIONAL_OPTIONS", CM_NULLPTR);
+ this->SetPropertyDefault("INSTALL_NAME_DIR", CM_NULLPTR);
this->SetPropertyDefault("INSTALL_RPATH", "");
this->SetPropertyDefault("INSTALL_RPATH_USE_LINK_PATH", "OFF");
this->SetPropertyDefault("SKIP_BUILD_RPATH", "OFF");
this->SetPropertyDefault("BUILD_WITH_INSTALL_RPATH", "OFF");
- this->SetPropertyDefault("ARCHIVE_OUTPUT_DIRECTORY", 0);
- this->SetPropertyDefault("LIBRARY_OUTPUT_DIRECTORY", 0);
- this->SetPropertyDefault("RUNTIME_OUTPUT_DIRECTORY", 0);
- this->SetPropertyDefault("PDB_OUTPUT_DIRECTORY", 0);
- this->SetPropertyDefault("COMPILE_PDB_OUTPUT_DIRECTORY", 0);
- this->SetPropertyDefault("Fortran_FORMAT", 0);
- this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", 0);
- this->SetPropertyDefault("GNUtoMS", 0);
- this->SetPropertyDefault("OSX_ARCHITECTURES", 0);
- this->SetPropertyDefault("IOS_INSTALL_COMBINED", 0);
- this->SetPropertyDefault("AUTOMOC", 0);
- this->SetPropertyDefault("AUTOUIC", 0);
- this->SetPropertyDefault("AUTORCC", 0);
- this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", 0);
- this->SetPropertyDefault("AUTOUIC_OPTIONS", 0);
- this->SetPropertyDefault("AUTORCC_OPTIONS", 0);
- this->SetPropertyDefault("LINK_DEPENDS_NO_SHARED", 0);
- this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0);
- this->SetPropertyDefault("WIN32_EXECUTABLE", 0);
- this->SetPropertyDefault("MACOSX_BUNDLE", 0);
- this->SetPropertyDefault("MACOSX_RPATH", 0);
- this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", 0);
- this->SetPropertyDefault("C_CLANG_TIDY", 0);
- this->SetPropertyDefault("C_COMPILER_LAUNCHER", 0);
- this->SetPropertyDefault("C_INCLUDE_WHAT_YOU_USE", 0);
- this->SetPropertyDefault("LINK_WHAT_YOU_USE", 0);
- this->SetPropertyDefault("C_STANDARD", 0);
- this->SetPropertyDefault("C_STANDARD_REQUIRED", 0);
- this->SetPropertyDefault("C_EXTENSIONS", 0);
- this->SetPropertyDefault("CXX_CLANG_TIDY", 0);
- this->SetPropertyDefault("CXX_COMPILER_LAUNCHER", 0);
- this->SetPropertyDefault("CXX_INCLUDE_WHAT_YOU_USE", 0);
- this->SetPropertyDefault("CXX_STANDARD", 0);
- this->SetPropertyDefault("CXX_STANDARD_REQUIRED", 0);
- this->SetPropertyDefault("CXX_EXTENSIONS", 0);
- this->SetPropertyDefault("LINK_SEARCH_START_STATIC", 0);
- this->SetPropertyDefault("LINK_SEARCH_END_STATIC", 0);
+ this->SetPropertyDefault("ARCHIVE_OUTPUT_DIRECTORY", CM_NULLPTR);
+ this->SetPropertyDefault("LIBRARY_OUTPUT_DIRECTORY", CM_NULLPTR);
+ this->SetPropertyDefault("RUNTIME_OUTPUT_DIRECTORY", CM_NULLPTR);
+ this->SetPropertyDefault("PDB_OUTPUT_DIRECTORY", CM_NULLPTR);
+ this->SetPropertyDefault("COMPILE_PDB_OUTPUT_DIRECTORY", CM_NULLPTR);
+ this->SetPropertyDefault("Fortran_FORMAT", CM_NULLPTR);
+ this->SetPropertyDefault("Fortran_MODULE_DIRECTORY", CM_NULLPTR);
+ this->SetPropertyDefault("GNUtoMS", CM_NULLPTR);
+ this->SetPropertyDefault("OSX_ARCHITECTURES", CM_NULLPTR);
+ this->SetPropertyDefault("IOS_INSTALL_COMBINED", CM_NULLPTR);
+ this->SetPropertyDefault("AUTOMOC", CM_NULLPTR);
+ this->SetPropertyDefault("AUTOUIC", CM_NULLPTR);
+ this->SetPropertyDefault("AUTORCC", CM_NULLPTR);
+ this->SetPropertyDefault("AUTOMOC_MOC_OPTIONS", CM_NULLPTR);
+ this->SetPropertyDefault("AUTOUIC_OPTIONS", CM_NULLPTR);
+ this->SetPropertyDefault("AUTORCC_OPTIONS", CM_NULLPTR);
+ this->SetPropertyDefault("LINK_DEPENDS_NO_SHARED", CM_NULLPTR);
+ this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", CM_NULLPTR);
+ this->SetPropertyDefault("WIN32_EXECUTABLE", CM_NULLPTR);
+ this->SetPropertyDefault("MACOSX_BUNDLE", CM_NULLPTR);
+ this->SetPropertyDefault("MACOSX_RPATH", CM_NULLPTR);
+ this->SetPropertyDefault("NO_SYSTEM_FROM_IMPORTED", CM_NULLPTR);
+ this->SetPropertyDefault("C_CLANG_TIDY", CM_NULLPTR);
+ this->SetPropertyDefault("C_COMPILER_LAUNCHER", CM_NULLPTR);
+ this->SetPropertyDefault("C_INCLUDE_WHAT_YOU_USE", CM_NULLPTR);
+ this->SetPropertyDefault("LINK_WHAT_YOU_USE", CM_NULLPTR);
+ this->SetPropertyDefault("C_STANDARD", CM_NULLPTR);
+ this->SetPropertyDefault("C_STANDARD_REQUIRED", CM_NULLPTR);
+ this->SetPropertyDefault("C_EXTENSIONS", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_CLANG_TIDY", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_COMPILER_LAUNCHER", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_INCLUDE_WHAT_YOU_USE", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_STANDARD", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_STANDARD_REQUIRED", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_EXTENSIONS", CM_NULLPTR);
+ this->SetPropertyDefault("LINK_SEARCH_START_STATIC", CM_NULLPTR);
+ this->SetPropertyDefault("LINK_SEARCH_END_STATIC", CM_NULLPTR);
}
// Collect the set of configuration types.
@@ -171,7 +171,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
"PDB_OUTPUT_DIRECTORY_",
"COMPILE_PDB_OUTPUT_DIRECTORY_",
"MAP_IMPORTED_CONFIG_",
- 0
+ CM_NULLPTR
};
for (std::vector<std::string>::iterator ci = configNames.begin();
ci != configNames.end(); ++ci) {
@@ -183,7 +183,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
}
std::string property = *p;
property += configUpper;
- this->SetPropertyDefault(property, 0);
+ this->SetPropertyDefault(property, CM_NULLPTR);
}
// Initialize per-configuration name postfix property from the
@@ -195,7 +195,7 @@ void cmTarget::SetMakefile(cmMakefile* mf)
this->TargetTypeValue != cmState::INTERFACE_LIBRARY) {
std::string property = cmSystemTools::UpperCase(*ci);
property += "_POSTFIX";
- this->SetPropertyDefault(property, 0);
+ this->SetPropertyDefault(property, CM_NULLPTR);
}
}
}
@@ -239,27 +239,27 @@ void cmTarget::SetMakefile(cmMakefile* mf)
if (this->GetType() != cmState::INTERFACE_LIBRARY &&
this->GetType() != cmState::UTILITY) {
- this->SetPropertyDefault("C_VISIBILITY_PRESET", 0);
- this->SetPropertyDefault("CXX_VISIBILITY_PRESET", 0);
- this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", 0);
+ this->SetPropertyDefault("C_VISIBILITY_PRESET", CM_NULLPTR);
+ this->SetPropertyDefault("CXX_VISIBILITY_PRESET", CM_NULLPTR);
+ this->SetPropertyDefault("VISIBILITY_INLINES_HIDDEN", CM_NULLPTR);
}
if (this->TargetTypeValue == cmState::EXECUTABLE) {
- this->SetPropertyDefault("ANDROID_GUI", 0);
- this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", 0);
- this->SetPropertyDefault("ENABLE_EXPORTS", 0);
+ this->SetPropertyDefault("ANDROID_GUI", CM_NULLPTR);
+ this->SetPropertyDefault("CROSSCOMPILING_EMULATOR", CM_NULLPTR);
+ this->SetPropertyDefault("ENABLE_EXPORTS", CM_NULLPTR);
}
if (this->TargetTypeValue == cmState::SHARED_LIBRARY ||
this->TargetTypeValue == cmState::MODULE_LIBRARY) {
this->SetProperty("POSITION_INDEPENDENT_CODE", "True");
}
if (this->TargetTypeValue == cmState::SHARED_LIBRARY) {
- this->SetPropertyDefault("WINDOWS_EXPORT_ALL_SYMBOLS", 0);
+ this->SetPropertyDefault("WINDOWS_EXPORT_ALL_SYMBOLS", CM_NULLPTR);
}
if (this->GetType() != cmState::INTERFACE_LIBRARY &&
this->GetType() != cmState::UTILITY) {
- this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", 0);
+ this->SetPropertyDefault("POSITION_INDEPENDENT_CODE", CM_NULLPTR);
}
// Record current policies for later use.
@@ -274,8 +274,8 @@ void cmTarget::SetMakefile(cmMakefile* mf)
if (this->GetType() != cmState::INTERFACE_LIBRARY &&
this->GetType() != cmState::UTILITY) {
- this->SetPropertyDefault("JOB_POOL_COMPILE", 0);
- this->SetPropertyDefault("JOB_POOL_LINK", 0);
+ this->SetPropertyDefault("JOB_POOL_COMPILE", CM_NULLPTR);
+ this->SetPropertyDefault("JOB_POOL_LINK", CM_NULLPTR);
}
}
@@ -293,7 +293,7 @@ cmListFileBacktrace const* cmTarget::GetUtilityBacktrace(
std::map<std::string, cmListFileBacktrace>::const_iterator i =
this->UtilityBacktraces.find(u);
if (i == this->UtilityBacktraces.end()) {
- return 0;
+ return CM_NULLPTR;
}
return &i->second;
@@ -409,7 +409,7 @@ cmSourceFile* cmTarget::AddSourceCMP0049(const std::string& s)
{
std::string src = this->ProcessSourceItemCMP0049(s);
if (!s.empty() && src.empty()) {
- return 0;
+ return CM_NULLPTR;
}
return this->AddSource(src);
}
@@ -480,7 +480,7 @@ cmSourceFile* cmTarget::AddSource(const std::string& src)
this->Internal->SourceBacktraces.push_back(lfbt);
}
if (cmGeneratorExpression::Find(src) != std::string::npos) {
- return 0;
+ return CM_NULLPTR;
}
return this->Makefile->GetOrCreateSource(src);
}
@@ -1064,7 +1064,7 @@ bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
return true;
}
std::ostringstream e;
- const char* modal = 0;
+ const char* modal = CM_NULLPTR;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch (context->GetPolicyStatus(cmPolicies::CMP0026)) {
case cmPolicies::WARN:
@@ -1106,7 +1106,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
"The property \""
<< prop << "\" is not allowed.";
context->IssueMessage(cmake::FATAL_ERROR, e.str());
- return 0;
+ return CM_NULLPTR;
}
// Watch for special "computed" properties that are dependent on
@@ -1119,7 +1119,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
static const std::string propLOCATION = "LOCATION";
if (prop == propLOCATION) {
if (!this->HandleLocationPropertyPolicy(context)) {
- return 0;
+ return CM_NULLPTR;
}
// Set the LOCATION property of the target.
@@ -1148,7 +1148,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
// Support "LOCATION_<CONFIG>".
else if (cmHasLiteralPrefix(prop, "LOCATION_")) {
if (!this->HandleLocationPropertyPolicy(context)) {
- return 0;
+ return CM_NULLPTR;
}
const char* configName = prop.c_str() + 9;
@@ -1170,7 +1170,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
std::string configName(prop.c_str(), prop.size() - 9);
if (configName != "IMPORTED") {
if (!this->HandleLocationPropertyPolicy(context)) {
- return 0;
+ return CM_NULLPTR;
}
if (this->IsImported()) {
this->Properties.SetProperty(
@@ -1217,7 +1217,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
if (specialProps.count(prop)) {
if (prop == propLINK_LIBRARIES) {
if (this->Internal->LinkImplementationPropertyEntries.empty()) {
- return 0;
+ return CM_NULLPTR;
}
static std::string output;
@@ -1229,7 +1229,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
return cmState::GetTargetTypeName(this->GetType());
} else if (prop == propINCLUDE_DIRECTORIES) {
if (this->Internal->IncludeDirectoriesEntries.empty()) {
- return 0;
+ return CM_NULLPTR;
}
static std::string output;
@@ -1237,7 +1237,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
return output.c_str();
} else if (prop == propCOMPILE_FEATURES) {
if (this->Internal->CompileFeaturesEntries.empty()) {
- return 0;
+ return CM_NULLPTR;
}
static std::string output;
@@ -1245,7 +1245,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
return output.c_str();
} else if (prop == propCOMPILE_OPTIONS) {
if (this->Internal->CompileOptionsEntries.empty()) {
- return 0;
+ return CM_NULLPTR;
}
static std::string output;
@@ -1253,7 +1253,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
return output.c_str();
} else if (prop == propCOMPILE_DEFINITIONS) {
if (this->Internal->CompileDefinitionsEntries.empty()) {
- return 0;
+ return CM_NULLPTR;
}
static std::string output;
@@ -1269,7 +1269,7 @@ const char* cmTarget::GetProperty(const std::string& prop,
return this->GetMakefile()->GetCurrentSourceDirectory();
} else if (prop == propSOURCES) {
if (this->Internal->SourceEntries.empty()) {
- return 0;
+ return CM_NULLPTR;
}
std::ostringstream ss;
@@ -1434,8 +1434,8 @@ std::string cmTarget::ImportedGetFullPath(const std::string& config,
std::string result;
- const char* loc = 0;
- const char* imp = 0;
+ const char* loc = CM_NULLPTR;
+ const char* imp = CM_NULLPTR;
std::string suffix;
if (this->GetType() != cmState::INTERFACE_LIBRARY &&