summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CursesDialog/cmCursesOptionsWidget.cxx1
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx6
-rw-r--r--Source/QtDialog/QCMakeWidgets.cxx6
-rw-r--r--Source/cmAddCustomTargetCommand.cxx6
-rw-r--r--Source/cmAddExecutableCommand.cxx6
-rw-r--r--Source/cmAddLibraryCommand.cxx11
-rw-r--r--Source/cmComputeTargetDepends.cxx7
-rw-r--r--Source/cmExportCommand.cxx15
-rw-r--r--Source/cmGeneratorExpression.cxx4
-rw-r--r--Source/cmGeneratorExpression.h6
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx15
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx10
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h1
-rw-r--r--Source/cmGlobalGenerator.cxx6
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx1
-rw-r--r--Source/cmIDEFlagTable.h1
-rw-r--r--Source/cmIDEOptions.cxx80
-rw-r--r--Source/cmIDEOptions.h2
-rw-r--r--Source/cmIncludeCommand.cxx6
-rw-r--r--Source/cmLocalGenerator.cxx19
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx91
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h3
-rw-r--r--Source/cmMakefile.cxx22
-rw-r--r--Source/cmMakefile.h2
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx4
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx5
-rw-r--r--Source/cmMakefileTargetGenerator.cxx39
-rw-r--r--Source/cmMakefileTargetGenerator.h6
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx80
-rw-r--r--Source/cmSystemTools.cxx4
-rw-r--r--Source/cmTarget.cxx7
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx14
-rw-r--r--Source/cmVS11CLFlagTable.h9
-rw-r--r--Source/cmVS12CLFlagTable.h9
35 files changed, 280 insertions, 226 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 4b27c72..7b9db16 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 0)
-set(CMake_VERSION_PATCH 20140331)
+set(CMake_VERSION_PATCH 20140403)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CursesDialog/cmCursesOptionsWidget.cxx b/Source/CursesDialog/cmCursesOptionsWidget.cxx
index d76ba2a..2f4b59e 100644
--- a/Source/CursesDialog/cmCursesOptionsWidget.cxx
+++ b/Source/CursesDialog/cmCursesOptionsWidget.cxx
@@ -59,7 +59,6 @@ bool cmCursesOptionsWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w)
{
return false;
}
- return false;
}
void cmCursesOptionsWidget::AddOption(std::string const & option )
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index f62afd6..1a98cea 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -578,7 +578,8 @@ void CMakeSetupDialog::doInterrupt()
void CMakeSetupDialog::doSourceBrowse()
{
QString dir = QFileDialog::getExistingDirectory(this,
- tr("Enter Path to Source"), this->SourceDirectory->text());
+ tr("Enter Path to Source"), this->SourceDirectory->text(),
+ QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
if(!dir.isEmpty())
{
this->setSourceDirectory(dir);
@@ -608,7 +609,8 @@ void CMakeSetupDialog::updateBinaryDirectory(const QString& dir)
void CMakeSetupDialog::doBinaryBrowse()
{
QString dir = QFileDialog::getExistingDirectory(this,
- tr("Enter Path to Build"), this->BinaryDirectory->currentText());
+ tr("Enter Path to Build"), this->BinaryDirectory->currentText(),
+ QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText())
{
this->setBinaryDirectory(dir);
diff --git a/Source/QtDialog/QCMakeWidgets.cxx b/Source/QtDialog/QCMakeWidgets.cxx
index a0c5e17..41f98b5 100644
--- a/Source/QtDialog/QCMakeWidgets.cxx
+++ b/Source/QtDialog/QCMakeWidgets.cxx
@@ -67,7 +67,8 @@ void QCMakeFilePathEditor::chooseFile()
title = title.arg(this->Variable);
}
this->fileDialogExists(true);
- path = QFileDialog::getOpenFileName(this, title, info.absolutePath());
+ path = QFileDialog::getOpenFileName(this, title, info.absolutePath(),
+ QString(), NULL, QFileDialog::DontResolveSymlinks);
this->fileDialogExists(false);
if(!path.isEmpty())
@@ -91,7 +92,8 @@ void QCMakePathEditor::chooseFile()
title = title.arg(this->Variable);
}
this->fileDialogExists(true);
- path = QFileDialog::getExistingDirectory(this, title, this->text());
+ path = QFileDialog::getExistingDirectory(this, title, this->text(),
+ QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
this->fileDialogExists(false);
if(!path.isEmpty())
{
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index da02f00..2fb0eb3 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -165,10 +165,13 @@ bool cmAddCustomTargetCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -180,9 +183,6 @@ bool cmAddCustomTargetCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << targetName <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index 6e48e90..c30e764 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -79,10 +79,13 @@ bool cmAddExecutableCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -94,9 +97,6 @@ bool cmAddExecutableCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << exename <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 6159f86..cdc9f2a 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -214,11 +214,17 @@ bool cmAddLibraryCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
- issueMessage = type != cmTarget::INTERFACE_LIBRARY;
+ if(type != cmTarget::INTERFACE_LIBRARY)
+ {
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
+ issueMessage = true;
+ }
case cmPolicies::OLD:
break;
case cmPolicies::NEW:
@@ -229,9 +235,6 @@ bool cmAddLibraryCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << libName <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 8655cb7..eb62455 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -364,9 +364,12 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
cmMakefile *makefile = depender->GetMakefile();
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
+ cmOStringStream e;
switch(depender->GetPolicyStatusCMP0046())
{
case cmPolicies::WARN:
+ e << (makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0046)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -379,9 +382,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
if(issueMessage)
{
cmake* cm = this->GlobalGenerator->GetCMakeInstance();
- cmOStringStream e;
- e << (makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0046)) << "\n";
+
e << "The dependency target \"" << dependee_name
<< "\" of target \"" << depender->GetName() << "\" does not exist.";
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx
index dcb77ba..2536ada 100644
--- a/Source/cmExportCommand.cxx
+++ b/Source/cmExportCommand.cxx
@@ -223,18 +223,15 @@ bool cmExportCommand
// Compute the set of configurations exported.
std::vector<std::string> configurationTypes;
this->Makefile->GetConfigurations(configurationTypes);
- if(!configurationTypes.empty())
+ if(configurationTypes.empty())
{
- for(std::vector<std::string>::const_iterator
- ci = configurationTypes.begin();
- ci != configurationTypes.end(); ++ci)
- {
- ebfg->AddConfiguration(*ci);
- }
+ configurationTypes.push_back("");
}
- else
+ for(std::vector<std::string>::const_iterator
+ ci = configurationTypes.begin();
+ ci != configurationTypes.end(); ++ci)
{
- ebfg->AddConfiguration("");
+ ebfg->AddConfiguration(*ci);
}
if (this->ExportSet)
{
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index e127f3a..d09e950 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -90,6 +90,7 @@ const char *cmCompiledGeneratorExpression::Evaluate(
context.HadError = false;
context.HadContextSensitiveCondition = false;
context.HeadTarget = headTarget;
+ context.EvaluateForBuildsystem = this->EvaluateForBuildsystem;
context.CurrentTarget = currentTarget ? currentTarget : headTarget;
context.Backtrace = this->Backtrace;
@@ -124,7 +125,8 @@ cmCompiledGeneratorExpression::cmCompiledGeneratorExpression(
cmListFileBacktrace const& backtrace,
const std::string& input)
: Backtrace(backtrace), Input(input),
- HadContextSensitiveCondition(false)
+ HadContextSensitiveCondition(false),
+ EvaluateForBuildsystem(false)
{
cmGeneratorExpressionLexer l;
std::vector<cmGeneratorExpressionToken> tokens =
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index d0a6aef..da64515 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -112,6 +112,11 @@ public:
return this->HadContextSensitiveCondition;
}
+ void SetEvaluateForBuildsystem(bool eval)
+ {
+ this->EvaluateForBuildsystem = eval;
+ }
+
private:
cmCompiledGeneratorExpression(cmListFileBacktrace const& backtrace,
const std::string& input);
@@ -131,6 +136,7 @@ private:
mutable std::set<std::string> SeenTargetProperties;
mutable std::string Output;
mutable bool HadContextSensitiveCondition;
+ bool EvaluateForBuildsystem;
};
#endif
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx
index d41285d..95a946a 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.cxx
+++ b/Source/cmGeneratorExpressionEvaluationFile.cxx
@@ -135,18 +135,15 @@ void cmGeneratorExpressionEvaluationFile::Generate()
if (allConfigs.empty())
{
- this->Generate("", inputExpression.get(), outputFiles);
+ allConfigs.push_back("");
}
- else
+ for(std::vector<std::string>::const_iterator li = allConfigs.begin();
+ li != allConfigs.end(); ++li)
{
- for(std::vector<std::string>::const_iterator li = allConfigs.begin();
- li != allConfigs.end(); ++li)
+ this->Generate(*li, inputExpression.get(), outputFiles);
+ if(cmSystemTools::GetFatalErrorOccured())
{
- this->Generate(*li, inputExpression.get(), outputFiles);
- if(cmSystemTools::GetFatalErrorOccured())
- {
- return;
- }
+ return;
}
}
}
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index 59e3aec..a513921 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -1252,6 +1252,16 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
const GeneratorExpressionContent *content,
cmGeneratorExpressionDAGChecker *) const
{
+ if (!context->EvaluateForBuildsystem)
+ {
+ cmOStringStream e;
+ e << "The evaluation of the TARGET_OBJECTS generator expression "
+ "is only suitable for consumption by CMake. It is not suitable "
+ "for writing out elsewhere.";
+ reportError(context, content->GetOriginalExpression(), e.str());
+ return std::string();
+ }
+
std::string tgtName = parameters.front();
cmGeneratorTarget* gt =
context->Makefile->FindGeneratorTargetToUse(tgtName.c_str());
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index a7099cb..54a2548 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -34,6 +34,7 @@ struct cmGeneratorExpressionContext
bool Quiet;
bool HadError;
bool HadContextSensitiveCondition;
+ bool EvaluateForBuildsystem;
};
struct cmGeneratorExpressionDAGChecker;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 0f7dfe8..f09f7b3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -770,7 +770,8 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
switch(mf->GetPolicyStatus(cmPolicies::CMP0025))
{
case cmPolicies::WARN:
- if(!this->CMakeInstance->GetIsInTryCompile())
+ if(!this->CMakeInstance->GetIsInTryCompile() &&
+ mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0025"))
{
cmOStringStream w;
w << policies->GetPolicyWarning(cmPolicies::CMP0025) << "\n"
@@ -801,7 +802,8 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
switch(mf->GetPolicyStatus(cmPolicies::CMP0047))
{
case cmPolicies::WARN:
- if(!this->CMakeInstance->GetIsInTryCompile())
+ if(!this->CMakeInstance->GetIsInTryCompile() &&
+ mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0047"))
{
cmOStringStream w;
w << policies->GetPolicyWarning(cmPolicies::CMP0047) << "\n"
diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx
index 0ae1b34..e44ed79 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.cxx
+++ b/Source/cmGlobalWatcomWMakeGenerator.cxx
@@ -35,7 +35,6 @@ void cmGlobalWatcomWMakeGenerator
mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
- mf->AddDefinition("CMAKE_NO_QUOTED_OBJECTS", "1");
mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
diff --git a/Source/cmIDEFlagTable.h b/Source/cmIDEFlagTable.h
index e372c0a..d9a045d 100644
--- a/Source/cmIDEFlagTable.h
+++ b/Source/cmIDEFlagTable.h
@@ -31,6 +31,7 @@ struct cmIDEFlagTable
// old value with semicolons (e.g.
// /NODEFAULTLIB: =>
// IgnoreDefaultLibraryNames)
+ UserFollowing = (1<<5), // expect value in following argument
UserValueIgnored = UserValue | UserIgnored,
UserValueRequired = UserValue | UserRequired
diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx
index e03223f..1f3c066 100644
--- a/Source/cmIDEOptions.cxx
+++ b/Source/cmIDEOptions.cxx
@@ -19,6 +19,7 @@ cmIDEOptions::cmIDEOptions()
this->DoingDefine = false;
this->AllowDefine = true;
this->AllowSlash = false;
+ this->DoingFollowing = 0;
for(int i=0; i < FlagTableCount; ++i)
{
this->FlagTable[i] = 0;
@@ -41,6 +42,14 @@ void cmIDEOptions::HandleFlag(const char* flag)
return;
}
+ // If the last option expected a following value, this is it.
+ if(this->DoingFollowing)
+ {
+ this->FlagMapUpdate(this->DoingFollowing, flag);
+ this->DoingFollowing = 0;
+ return;
+ }
+
// Look for known arguments.
if(flag[0] == '-' || (this->AllowSlash && flag[0] == '/'))
{
@@ -99,40 +108,22 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table,
(!(entry->special & cmIDEFlagTable::UserRequired) ||
static_cast<int>(strlen(flag+1)) > n))
{
- if(entry->special & cmIDEFlagTable::UserIgnored)
- {
- // Ignore the user-specified value.
- this->FlagMap[entry->IDEName] = entry->value;
- }
- else if(entry->special & cmIDEFlagTable::SemicolonAppendable)
- {
- const char *new_value = flag+1+n;
-
- std::map<std::string,std::string>::iterator itr;
- itr = this->FlagMap.find(entry->IDEName);
- if(itr != this->FlagMap.end())
- {
- // Append to old value (if present) with semicolons;
- itr->second += ";";
- itr->second += new_value;
- }
- else
- {
- this->FlagMap[entry->IDEName] = new_value;
- }
- }
- else
- {
- // Use the user-specified value.
- this->FlagMap[entry->IDEName] = flag+1+n;
- }
+ this->FlagMapUpdate(entry, flag+n+1);
entry_found = true;
}
}
else if(strcmp(flag+1, entry->commandFlag) == 0)
{
- // This flag table entry provides a fixed value.
- this->FlagMap[entry->IDEName] = entry->value;
+ if(entry->special & cmIDEFlagTable::UserFollowing)
+ {
+ // This flag expects a value in the following argument.
+ this->DoingFollowing = entry;
+ }
+ else
+ {
+ // This flag table entry provides a fixed value.
+ this->FlagMap[entry->IDEName] = entry->value;
+ }
entry_found = true;
}
@@ -151,6 +142,37 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table,
}
//----------------------------------------------------------------------------
+void cmIDEOptions::FlagMapUpdate(cmIDEFlagTable const* entry,
+ const char* new_value)
+{
+ if(entry->special & cmIDEFlagTable::UserIgnored)
+ {
+ // Ignore the user-specified value.
+ this->FlagMap[entry->IDEName] = entry->value;
+ }
+ else if(entry->special & cmIDEFlagTable::SemicolonAppendable)
+ {
+ std::map<std::string,std::string>::iterator itr;
+ itr = this->FlagMap.find(entry->IDEName);
+ if(itr != this->FlagMap.end())
+ {
+ // Append to old value (if present) with semicolons;
+ itr->second += ";";
+ itr->second += new_value;
+ }
+ else
+ {
+ this->FlagMap[entry->IDEName] = new_value;
+ }
+ }
+ else
+ {
+ // Use the user-specified value.
+ this->FlagMap[entry->IDEName] = new_value;
+ }
+}
+
+//----------------------------------------------------------------------------
void cmIDEOptions::AddDefine(const std::string& def)
{
this->Defines.push_back(def);
diff --git a/Source/cmIDEOptions.h b/Source/cmIDEOptions.h
index 691893f..e7749ec 100644
--- a/Source/cmIDEOptions.h
+++ b/Source/cmIDEOptions.h
@@ -51,11 +51,13 @@ protected:
bool DoingDefine;
bool AllowDefine;
bool AllowSlash;
+ cmIDEFlagTable const* DoingFollowing;
enum { FlagTableCount = 16 };
cmIDEFlagTable const* FlagTable[FlagTableCount];
void HandleFlag(const char* flag);
bool CheckFlagTable(cmIDEFlagTable const* table, const char* flag,
bool& flag_handled);
+ void FlagMapUpdate(cmIDEFlagTable const* entry, const char* new_value);
virtual void StoreUnknownFlag(const char* flag) = 0;
};
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index 4d9935c..0a4f5c9 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -98,11 +98,14 @@ bool cmIncludeCommand
if (gg->IsExportedTargetsFile(fname_abs))
{
const char *modal = 0;
+ cmOStringStream e;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0024))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0024)) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -114,9 +117,6 @@ bool cmIncludeCommand
}
if (modal)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0024)) << "\n";
e << "The file\n " << fname_abs << "\nwas generated by the export() "
"command. It " << modal << " not be used as the argument to the "
"include() command. Use ALIAS targets instead to refer to targets "
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e2f8375..dcf9f97 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -542,6 +542,10 @@ void cmLocalGenerator::GenerateTargetManifest()
// Collect the set of configuration types.
std::vector<std::string> configNames;
this->Makefile->GetConfigurations(configNames);
+ if(configNames.empty())
+ {
+ configNames.push_back("");
+ }
// Add our targets to the manifest for each configuration.
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
@@ -557,18 +561,11 @@ void cmLocalGenerator::GenerateTargetManifest()
{
continue;
}
- if(configNames.empty())
+ for(std::vector<std::string>::iterator ci = configNames.begin();
+ ci != configNames.end(); ++ci)
{
- target.GenerateTargetManifest("");
- }
- else
- {
- for(std::vector<std::string>::iterator ci = configNames.begin();
- ci != configNames.end(); ++ci)
- {
- const char* config = ci->c_str();
- target.GenerateTargetManifest(config);
- }
+ const char* config = ci->c_str();
+ target.GenerateTargetManifest(config);
}
}
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index bbd350d..7ffe84d 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2183,59 +2183,82 @@ cmLocalUnixMakefileGenerator3
//----------------------------------------------------------------------------
std::string
-cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p)
+cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
+ bool useWatcomQuote)
{
-
// Split the path into its components.
std::vector<std::string> components;
cmSystemTools::SplitPath(p, components);
- // Return an empty path if there are no components.
- if(components.empty())
+ // Open the quoted result.
+ std::string result;
+ if(useWatcomQuote)
+ {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ result = "'";
+#else
+ result = "\"'";
+#endif
+ }
+ else
{
- return "\"\"";
+ result = "\"";
}
- // Choose a slash direction and fix root component.
- const char* slash = "/";
+ // Return an empty path if there are no components.
+ if(!components.empty())
+ {
+ // Choose a slash direction and fix root component.
+ const char* slash = "/";
#if defined(_WIN32) && !defined(__CYGWIN__)
- if(!cmSystemTools::GetForceUnixPaths())
- {
- slash = "\\";
- for(std::string::iterator i = components[0].begin();
- i != components[0].end(); ++i)
- {
- if(*i == '/')
- {
- *i = '\\';
- }
- }
- }
+ if(!cmSystemTools::GetForceUnixPaths())
+ {
+ slash = "\\";
+ for(std::string::iterator i = components[0].begin();
+ i != components[0].end(); ++i)
+ {
+ if(*i == '/')
+ {
+ *i = '\\';
+ }
+ }
+ }
#endif
- // Begin the quoted result with the root component.
- std::string result = "\"";
- result += components[0];
+ // Begin the quoted result with the root component.
+ result += components[0];
- // Now add the rest of the components separated by the proper slash
- // direction for this platform.
- bool first = true;
- for(unsigned int i=1; i < components.size(); ++i)
- {
- // Only the last component can be empty to avoid double slashes.
- if(components[i].length() > 0 || (i == (components.size()-1)))
+ // Now add the rest of the components separated by the proper slash
+ // direction for this platform.
+ bool first = true;
+ for(unsigned int i=1; i < components.size(); ++i)
{
- if(!first)
+ // Only the last component can be empty to avoid double slashes.
+ if(components[i].length() > 0 || (i == (components.size()-1)))
{
- result += slash;
+ if(!first)
+ {
+ result += slash;
+ }
+ result += components[i];
+ first = false;
}
- result += components[i];
- first = false;
}
}
// Close the quoted result.
- result += "\"";
+ if(useWatcomQuote)
+ {
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ result += "'";
+#else
+ result += "'\"";
+#endif
+ }
+ else
+ {
+ result += "\"";
+ }
return result;
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 14543fb..99974ee 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -186,7 +186,8 @@ public:
const char *targetDir,
cmLocalGenerator::RelativeRoot returnDir);
- static std::string ConvertToQuotedOutputPath(const char* p);
+ static std::string ConvertToQuotedOutputPath(const char* p,
+ bool useWatcomQuote);
std::string CreateMakeVariable(const std::string& sin,
const std::string& s2in);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 06dc0c5..b1d6fe2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -893,9 +893,12 @@ cmMakefile::AddCustomCommandToTarget(const std::string& target,
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
+ cmOStringStream e;
switch(this->GetPolicyStatus(cmPolicies::CMP0040))
{
case cmPolicies::WARN:
+ e << (this->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0040)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -908,9 +911,6 @@ cmMakefile::AddCustomCommandToTarget(const std::string& target,
if(issueMessage)
{
- cmOStringStream e;
- e << (this->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0040)) << "\n";
e << "The target name \"" << target << "\" is unknown in this context.";
IssueMessage(messageType, e.str());
}
@@ -4330,6 +4330,22 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
return this->GetPolicies()->GetPolicyStatus(id);
}
+//----------------------------------------------------------------------------
+bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var)
+{
+ // Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting.
+ if(!var.empty())
+ {
+ if(const char* val = this->GetDefinition(var))
+ {
+ return cmSystemTools::IsOn(val);
+ }
+ }
+ // Enable optional policy warnings with --debug-output or --trace.
+ cmake* cm = this->GetCMakeInstance();
+ return cm->GetDebugOutput() || cm->GetTrace();
+}
+
bool cmMakefile::SetPolicy(const char *id,
cmPolicies::PolicyStatus status)
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 460a85c..8ff6daa 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -880,6 +880,8 @@ public:
std::set<std::string> const & GetSystemIncludeDirectories() const
{ return this->SystemIncludeDirectories; }
+ bool PolicyOptionalWarningEnabled(std::string const& var);
+
protected:
// add link libraries and directories to the target
void AddGlobalLinkInformation(const std::string& name, cmTarget& target);
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index a61005b..701d5a0 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -290,6 +290,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
linkRuleVar += linkLanguage;
linkRuleVar += "_LINK_EXECUTABLE";
std::string linkRule = this->GetLinkRule(linkRuleVar);
+ bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar+"_USE_WATCOM_QUOTE");
std::vector<std::string> commands1;
cmSystemTools::ExpandListArgument(linkRule, real_link_commands);
if(this->Target->IsExecutableWithExports())
@@ -343,7 +344,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// rule.
std::string buildObjs;
this->CreateObjectLists(useLinkScript, false,
- useResponseFileForObjects, buildObjs, depends);
+ useResponseFileForObjects, buildObjs, depends,
+ useWatcomQuote);
cmLocalGenerator::RuleVariables vars;
vars.RuleLauncher = "RULE_LAUNCH_LINK";
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 02469d1..754f62f 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -458,6 +458,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
this->Target);
}
+ bool useWatcomQuote = this->Makefile->IsOn(linkRuleVar+"_USE_WATCOM_QUOTE");
+
// Determine whether a link script will be used.
bool useLinkScript = this->GlobalGenerator->GetUseLinkScript();
@@ -553,7 +555,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
// rule.
std::string buildObjs;
this->CreateObjectLists(useLinkScript, useArchiveRules,
- useResponseFileForObjects, buildObjs, depends);
+ useResponseFileForObjects, buildObjs, depends,
+ useWatcomQuote);
cmLocalGenerator::RuleVariables vars;
vars.TargetPDB = targetOutPathPDB.c_str();
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 2d55621..f940ac4 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1349,7 +1349,8 @@ cmMakefileTargetGenerator::AppendProgress(std::vector<std::string>& commands)
void
cmMakefileTargetGenerator
::WriteObjectsVariable(std::string& variableName,
- std::string& variableNameExternal)
+ std::string& variableNameExternal,
+ bool useWatcomQuote)
{
// Write a make variable assignment that lists all objects for the
// target.
@@ -1360,8 +1361,6 @@ cmMakefileTargetGenerator
<< "# Object files for target " << this->Target->GetName() << "\n"
<< variableName << " =";
std::string object;
- const char* objName =
- this->Makefile->GetDefinition("CMAKE_NO_QUOTED_OBJECTS");
const char* lineContinue =
this->Makefile->GetDefinition("CMAKE_MAKE_LINE_CONTINUE");
if(!lineContinue)
@@ -1372,17 +1371,9 @@ cmMakefileTargetGenerator
i != this->Objects.end(); ++i)
{
*this->BuildFileStream << " " << lineContinue << "\n";
- if(objName)
- {
- *this->BuildFileStream <<
- this->Convert(*i, cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::MAKEFILE);
- }
- else
- {
- *this->BuildFileStream <<
- this->LocalGenerator->ConvertToQuotedOutputPath(i->c_str());
- }
+ *this->BuildFileStream <<
+ this->LocalGenerator->ConvertToQuotedOutputPath(i->c_str(),
+ useWatcomQuote);
}
*this->BuildFileStream << "\n";
@@ -1404,17 +1395,9 @@ cmMakefileTargetGenerator
*this->BuildFileStream
<< " " << lineContinue << "\n"
<< this->Makefile->GetSafeDefinition("CMAKE_OBJECT_NAME");
- if(objName)
- {
- *this->BuildFileStream <<
- this->Convert(*i, cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::MAKEFILE);
- }
- else
- {
- *this->BuildFileStream <<
- this->LocalGenerator->ConvertToQuotedOutputPath(i->c_str());
- }
+ *this->BuildFileStream <<
+ this->LocalGenerator->ConvertToQuotedOutputPath(i->c_str(),
+ useWatcomQuote);
}
*this->BuildFileStream << "\n" << "\n";
}
@@ -1883,11 +1866,13 @@ void
cmMakefileTargetGenerator
::CreateObjectLists(bool useLinkScript, bool useArchiveRules,
bool useResponseFile, std::string& buildObjs,
- std::vector<std::string>& makefile_depends)
+ std::vector<std::string>& makefile_depends,
+ bool useWatcomQuote)
{
std::string variableName;
std::string variableNameExternal;
- this->WriteObjectsVariable(variableName, variableNameExternal);
+ this->WriteObjectsVariable(variableName, variableNameExternal,
+ useWatcomQuote);
if(useResponseFile)
{
// MSVC response files cannot exceed 128K.
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index 7ff6da9..ff94660 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -113,7 +113,8 @@ protected:
// write out the variable that lists the objects for this target
void WriteObjectsVariable(std::string& variableName,
- std::string& variableNameExternal);
+ std::string& variableNameExternal,
+ bool useWatcomQuote);
void WriteObjectsString(std::string& buildObjs);
void WriteObjectsStrings(std::vector<std::string>& objStrings,
std::string::size_type limit = std::string::npos);
@@ -172,7 +173,8 @@ protected:
/** Create lists of object files for linking and cleaning. */
void CreateObjectLists(bool useLinkScript, bool useArchiveRules,
bool useResponseFile, std::string& buildObjs,
- std::vector<std::string>& makefile_depends);
+ std::vector<std::string>& makefile_depends,
+ bool useWatcomQuote);
void AddIncludeFlags(std::string& flags, const std::string& lang);
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 853319e..1d0336a 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -314,72 +314,49 @@ cmNinjaNormalTargetGenerator
::ComputeLinkCmd()
{
std::vector<std::string> linkCmds;
- cmTarget::TargetType targetType = this->GetTarget()->GetType();
- switch (targetType) {
+ cmMakefile* mf = this->GetMakefile();
+ {
+ std::string linkCmdVar = "CMAKE_";
+ linkCmdVar += this->TargetLinkLanguage;
+ linkCmdVar += this->GetGeneratorTarget()->GetCreateRuleVariable();
+ const char *linkCmd = mf->GetDefinition(linkCmdVar);
+ if (linkCmd)
+ {
+ cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
+ return linkCmds;
+ }
+ }
+ switch (this->GetTarget()->GetType()) {
case cmTarget::STATIC_LIBRARY: {
- // Check if you have a non archive way to create the static library.
- {
- std::string linkCmdVar = "CMAKE_";
- linkCmdVar += this->TargetLinkLanguage;
- linkCmdVar += "_CREATE_STATIC_LIBRARY";
- if (const char *linkCmd =
- this->GetMakefile()->GetDefinition(linkCmdVar))
- {
- cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
- return linkCmds;
- }
- }
-
// We have archive link commands set. First, delete the existing archive.
+ {
std::string cmakeCommand =
this->GetLocalGenerator()->ConvertToOutputFormat(
- this->GetMakefile()->GetRequiredDefinition("CMAKE_COMMAND"),
+ mf->GetRequiredDefinition("CMAKE_COMMAND"),
cmLocalGenerator::SHELL);
linkCmds.push_back(cmakeCommand + " -E remove $out");
-
+ }
// TODO: Use ARCHIVE_APPEND for archives over a certain size.
{
std::string linkCmdVar = "CMAKE_";
linkCmdVar += this->TargetLinkLanguage;
linkCmdVar += "_ARCHIVE_CREATE";
- const char *linkCmd =
- this->GetMakefile()->GetRequiredDefinition(linkCmdVar);
+ const char *linkCmd = mf->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
{
std::string linkCmdVar = "CMAKE_";
linkCmdVar += this->TargetLinkLanguage;
linkCmdVar += "_ARCHIVE_FINISH";
- const char *linkCmd =
- this->GetMakefile()->GetRequiredDefinition(linkCmdVar);
+ const char *linkCmd = mf->GetRequiredDefinition(linkCmdVar);
cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
}
return linkCmds;
}
case cmTarget::SHARED_LIBRARY:
case cmTarget::MODULE_LIBRARY:
- case cmTarget::EXECUTABLE: {
- std::string linkCmdVar = "CMAKE_";
- linkCmdVar += this->TargetLinkLanguage;
- switch (targetType) {
- case cmTarget::SHARED_LIBRARY:
- linkCmdVar += "_CREATE_SHARED_LIBRARY";
- break;
- case cmTarget::MODULE_LIBRARY:
- linkCmdVar += "_CREATE_SHARED_MODULE";
- break;
- case cmTarget::EXECUTABLE:
- linkCmdVar += "_LINK_EXECUTABLE";
- break;
- default:
- assert(0 && "Unexpected target type");
- }
-
- const char *linkCmd =
- this->GetMakefile()->GetRequiredDefinition(linkCmdVar);
- cmSystemTools::ExpandListArgument(linkCmd, linkCmds);
- return linkCmds;
- }
+ case cmTarget::EXECUTABLE:
+ break;
default:
assert(0 && "Unexpected target type");
}
@@ -457,14 +434,17 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
cmNinjaDeps explicitDeps = this->GetObjects();
cmNinjaDeps implicitDeps = this->ComputeLinkDeps();
+ cmMakefile* mf = this->GetMakefile();
+
std::string frameworkPath;
std::string linkPath;
+ cmGeneratorTarget* gtarget = this->GetGeneratorTarget();
this->GetLocalGenerator()->GetTargetFlags(vars["LINK_LIBRARIES"],
vars["FLAGS"],
vars["LINK_FLAGS"],
frameworkPath,
linkPath,
- this->GetGeneratorTarget());
+ gtarget);
this->addPoolNinjaVariable("JOB_POOL_LINK", this->GetTarget(), vars);
@@ -481,7 +461,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
? vars["FLAGS"]
: vars["ARCH_FLAGS"]);
this->GetLocalGenerator()->AddArchitectureFlags(flags,
- this->GetGeneratorTarget(),
+ gtarget,
this->TargetLinkLanguage,
this->GetConfigName());
if (targetType == cmTarget::EXECUTABLE) {
@@ -491,7 +471,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
}
if (this->GetTarget()->HasSOName(this->GetConfigName())) {
vars["SONAME_FLAG"] =
- this->GetMakefile()->GetSONameFlag(this->TargetLinkLanguage);
+ mf->GetSONameFlag(this->TargetLinkLanguage);
vars["SONAME"] = this->TargetNameSO;
if (targetType == cmTarget::SHARED_LIBRARY) {
std::string install_name_dir = this->GetTarget()
@@ -514,7 +494,6 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
EnsureParentDirectoryExists(impLibPath);
}
- cmMakefile* mf = this->GetMakefile();
if (!this->SetMsvcTargetPdbVariable(vars))
{
// It is common to place debug symbols at a specific place,
@@ -557,8 +536,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
for (std::vector<cmCustomCommand>::const_iterator
ci = cmdLists[i]->begin();
ci != cmdLists[i]->end(); ++ci) {
- cmCustomCommandGenerator ccg(*ci, this->GetConfigName(),
- this->GetMakefile());
+ cmCustomCommandGenerator ccg(*ci, this->GetConfigName(), mf);
this->GetLocalGenerator()->AppendCustomCommandLines(ccg,
*cmdLineLists[i]);
}
@@ -568,7 +546,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
// the link commands.
if (!preLinkCmdLines.empty()) {
const std::string homeOutDir = this->GetLocalGenerator()
- ->ConvertToOutputFormat(this->GetMakefile()->GetHomeOutputDirectory(),
+ ->ConvertToOutputFormat(mf->GetHomeOutputDirectory(),
cmLocalGenerator::SHELL);
preLinkCmdLines.push_back("cd " + homeOutDir);
}
@@ -591,7 +569,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
int commandLineLengthLimit = 1;
const char* forceRspFile = "CMAKE_NINJA_FORCE_RESPONSE_FILE";
- if (!this->GetMakefile()->IsDefinitionSet(forceRspFile) &&
+ if (!mf->IsDefinitionSet(forceRspFile) &&
cmSystemTools::GetEnv(forceRspFile) == 0) {
#ifdef _WIN32
commandLineLengthLimit = 8000 - linkRuleLength;
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ef1e37b..c1c33f2 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1616,7 +1616,9 @@ long copy_data(struct archive *ar, struct archive *aw)
return (r);
}
}
- return r;
+#if !defined(__clang__)
+ return r; /* this should not happen but it silences a warning */
+#endif
}
bool extract_tar(const char* outFileName, bool verbose,
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 475bcdb..a87ec31 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -943,6 +943,7 @@ cmSourceFile* cmTarget::AddSource(const std::string& src)
this->Makefile->GetBacktrace(lfbt);
cmGeneratorExpression ge(lfbt);
cmsys::auto_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(src);
+ cge->SetEvaluateForBuildsystem(true);
this->Internal->SourceEntries.push_back(
new cmTargetInternals::TargetPropertyEntry(cge));
}
@@ -2916,11 +2917,14 @@ bool cmTarget::HandleLocationPropertyPolicy() const
{
return true;
}
+ cmOStringStream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0026))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0026)) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -2933,9 +2937,6 @@ bool cmTarget::HandleLocationPropertyPolicy() const
if (modal)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0026)) << "\n";
e << "The LOCATION property " << modal << " not be read from target \""
<< this->GetName() << "\". Use the target name directly with "
"add_custom_command, or use the generator expression $<TARGET_FILE>, "
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 115a988..1c2e625 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -103,11 +103,14 @@ bool cmTargetLinkLibrariesCommand
if (this->Target->GetType() == cmTarget::UTILITY)
{
+ cmOStringStream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0039))
{
case cmPolicies::WARN:
+ e << this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0039) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -119,9 +122,7 @@ bool cmTargetLinkLibrariesCommand
}
if (modal)
{
- cmOStringStream e;
- e << this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0039) << "\n"
+ e <<
"Utility target \"" << this->Target->GetName() << "\" " << modal
<< " not be used as the target of a target_link_libraries call.";
this->Makefile->IssueMessage(messageType, e.str());
@@ -373,11 +374,14 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
? cmTarget::KeywordTLLSignature : cmTarget::PlainTLLSignature;
if (!this->Target->PushTLLCommandTrace(sig))
{
+ cmOStringStream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0023))
{
case cmPolicies::WARN:
+ e << this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0023) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -390,14 +394,12 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
if(modal)
{
- cmOStringStream e;
// If the sig is a keyword form and there is a conflict, the existing
// form must be the plain form.
const char *existingSig
= (sig == cmTarget::KeywordTLLSignature ? "plain"
: "keyword");
- e << this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0023) << "\n"
+ e <<
"The " << existingSig << " signature for target_link_libraries "
"has already been used with the target \""
<< this->Target->GetName() << "\". All uses of "
diff --git a/Source/cmVS11CLFlagTable.h b/Source/cmVS11CLFlagTable.h
index 5ab8ebb..a61ab16 100644
--- a/Source/cmVS11CLFlagTable.h
+++ b/Source/cmVS11CLFlagTable.h
@@ -248,9 +248,9 @@ static cmVS7FlagTable cmVS11CLFlagTable[] =
{"ForcedUsingFiles", "FU",
"Forced #using File",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
- {"PREfastAdditionalOptions", "analyze:",
- "Additional Code Analysis Native options",
- "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
+ {"PREfastLog", "analyze:log",
+ "Code Analysis Log",
+ "", cmVS7FlagTable::UserFollowing},
{"PREfastAdditionalPlugins", "analyze:plugin",
"Additional Code Analysis Native plugins",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
@@ -283,9 +283,6 @@ static cmVS7FlagTable cmVS11CLFlagTable[] =
"", cmVS7FlagTable::UserValue},
// Skip [XMLDocumentationFileName] - no command line Switch.
// Skip [BrowseInformationFile] - no command line Switch.
- {"PREfastLog", "analyze:log ",
- "Code Analysis Log",
- "", cmVS7FlagTable::UserValue},
// Skip [AdditionalOptions] - no command line Switch.
{0,0,0,0,0}
};
diff --git a/Source/cmVS12CLFlagTable.h b/Source/cmVS12CLFlagTable.h
index 8f51319..0a7916f 100644
--- a/Source/cmVS12CLFlagTable.h
+++ b/Source/cmVS12CLFlagTable.h
@@ -254,9 +254,9 @@ static cmVS7FlagTable cmVS12CLFlagTable[] =
{"ForcedUsingFiles", "FU",
"Forced #using File",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
- {"PREfastAdditionalOptions", "analyze:",
- "Additional Code Analysis Native options",
- "", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
+ {"PREfastLog", "analyze:log",
+ "Code Analysis Log",
+ "", cmVS7FlagTable::UserFollowing},
{"PREfastAdditionalPlugins", "analyze:plugin",
"Additional Code Analysis Native plugins",
"", cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable},
@@ -289,9 +289,6 @@ static cmVS7FlagTable cmVS12CLFlagTable[] =
"", cmVS7FlagTable::UserValue},
// Skip [XMLDocumentationFileName] - no command line Switch.
// Skip [BrowseInformationFile] - no command line Switch.
- {"PREfastLog", "analyze:log ",
- "Code Analysis Log",
- "", cmVS7FlagTable::UserValue},
// Skip [AdditionalOptions] - no command line Switch.
{0,0,0,0,0}
};