summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-08 23:18:35 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-07 16:11:18 (GMT)
commit4e6ca504459640ff39eac48eb62fcae95c8fc8d2 (patch)
treec0784d1596284903582ce64f5254ea4f159aa8dc /Source
parent5412deded1073e9a217c771ae24e8c5a8a581a96 (diff)
downloadCMake-4e6ca504459640ff39eac48eb62fcae95c8fc8d2.zip
CMake-4e6ca504459640ff39eac48eb62fcae95c8fc8d2.tar.gz
CMake-4e6ca504459640ff39eac48eb62fcae95c8fc8d2.tar.bz2
cmTargetPropCommandBase: Change the interface to return bool.
This is needed for the target_compile_features command, which may fail at configure time if an invalid feature is specified.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmTargetCompileDefinitionsCommand.cxx3
-rw-r--r--Source/cmTargetCompileDefinitionsCommand.h2
-rw-r--r--Source/cmTargetCompileOptionsCommand.cxx3
-rw-r--r--Source/cmTargetCompileOptionsCommand.h2
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.cxx3
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.h2
-rw-r--r--Source/cmTargetPropCommandBase.cxx14
-rw-r--r--Source/cmTargetPropCommandBase.h4
-rw-r--r--Source/cmTargetSourcesCommand.cxx3
-rw-r--r--Source/cmTargetSourcesCommand.h2
10 files changed, 22 insertions, 16 deletions
diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index b567252..66d8ad3 100644
--- a/Source/cmTargetCompileDefinitionsCommand.cxx
+++ b/Source/cmTargetCompileDefinitionsCommand.cxx
@@ -58,9 +58,10 @@ std::string cmTargetCompileDefinitionsCommand
}
//----------------------------------------------------------------------------
-void cmTargetCompileDefinitionsCommand
+bool cmTargetCompileDefinitionsCommand
::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
bool, bool)
{
tgt->AppendProperty("COMPILE_DEFINITIONS", this->Join(content).c_str());
+ return true;
}
diff --git a/Source/cmTargetCompileDefinitionsCommand.h b/Source/cmTargetCompileDefinitionsCommand.h
index 5ba9e03..b548c70 100644
--- a/Source/cmTargetCompileDefinitionsCommand.h
+++ b/Source/cmTargetCompileDefinitionsCommand.h
@@ -44,7 +44,7 @@ private:
virtual void HandleImportedTarget(const std::string &tgt);
virtual void HandleMissingTarget(const std::string &name);
- virtual void HandleDirectContent(cmTarget *tgt,
+ virtual bool HandleDirectContent(cmTarget *tgt,
const std::vector<std::string> &content,
bool prepend, bool system);
virtual std::string Join(const std::vector<std::string> &content);
diff --git a/Source/cmTargetCompileOptionsCommand.cxx b/Source/cmTargetCompileOptionsCommand.cxx
index 254acc7..18499fd 100644
--- a/Source/cmTargetCompileOptionsCommand.cxx
+++ b/Source/cmTargetCompileOptionsCommand.cxx
@@ -51,7 +51,7 @@ std::string cmTargetCompileOptionsCommand
}
//----------------------------------------------------------------------------
-void cmTargetCompileOptionsCommand
+bool cmTargetCompileOptionsCommand
::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
bool, bool)
{
@@ -59,4 +59,5 @@ void cmTargetCompileOptionsCommand
this->Makefile->GetBacktrace(lfbt);
cmValueWithOrigin entry(this->Join(content), lfbt);
tgt->InsertCompileOption(entry);
+ return true;
}
diff --git a/Source/cmTargetCompileOptionsCommand.h b/Source/cmTargetCompileOptionsCommand.h
index d58dc07..d43534d 100644
--- a/Source/cmTargetCompileOptionsCommand.h
+++ b/Source/cmTargetCompileOptionsCommand.h
@@ -44,7 +44,7 @@ private:
virtual void HandleImportedTarget(const std::string &tgt);
virtual void HandleMissingTarget(const std::string &name);
- virtual void HandleDirectContent(cmTarget *tgt,
+ virtual bool HandleDirectContent(cmTarget *tgt,
const std::vector<std::string> &content,
bool prepend, bool system);
virtual std::string Join(const std::vector<std::string> &content);
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index f8e1188..caec7eb 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -66,7 +66,7 @@ std::string cmTargetIncludeDirectoriesCommand
}
//----------------------------------------------------------------------------
-void cmTargetIncludeDirectoriesCommand
+bool cmTargetIncludeDirectoriesCommand
::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
bool prepend, bool system)
{
@@ -78,6 +78,7 @@ void cmTargetIncludeDirectoriesCommand
{
tgt->AddSystemIncludeDirectories(content);
}
+ return true;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmTargetIncludeDirectoriesCommand.h b/Source/cmTargetIncludeDirectoriesCommand.h
index c8b22fb..2a7814e 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.h
+++ b/Source/cmTargetIncludeDirectoriesCommand.h
@@ -45,7 +45,7 @@ private:
virtual void HandleImportedTarget(const std::string &tgt);
virtual void HandleMissingTarget(const std::string &name);
- virtual void HandleDirectContent(cmTarget *tgt,
+ virtual bool HandleDirectContent(cmTarget *tgt,
const std::vector<std::string> &content,
bool prepend, bool system);
virtual void HandleInterfaceContent(cmTarget *tgt,
diff --git a/Source/cmTargetPropCommandBase.cxx b/Source/cmTargetPropCommandBase.cxx
index d356611..4696de4 100644
--- a/Source/cmTargetPropCommandBase.cxx
+++ b/Source/cmTargetPropCommandBase.cxx
@@ -132,29 +132,31 @@ bool cmTargetPropCommandBase
|| args[i] == "PRIVATE"
|| args[i] == "INTERFACE" )
{
- this->PopulateTargetProperies(scope, content, prepend, system);
- return true;
+ return this->PopulateTargetProperies(scope, content, prepend, system);
}
content.push_back(args[i]);
}
- this->PopulateTargetProperies(scope, content, prepend, system);
- return true;
+ return this->PopulateTargetProperies(scope, content, prepend, system);
}
//----------------------------------------------------------------------------
-void cmTargetPropCommandBase
+bool cmTargetPropCommandBase
::PopulateTargetProperies(const std::string &scope,
const std::vector<std::string> &content,
bool prepend, bool system)
{
if (scope == "PRIVATE" || scope == "PUBLIC")
{
- this->HandleDirectContent(this->Target, content, prepend, system);
+ if (!this->HandleDirectContent(this->Target, content, prepend, system))
+ {
+ return false;
+ }
}
if (scope == "INTERFACE" || scope == "PUBLIC")
{
this->HandleInterfaceContent(this->Target, content, prepend, system);
}
+ return true;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmTargetPropCommandBase.h b/Source/cmTargetPropCommandBase.h
index 555a08a..d42b588 100644
--- a/Source/cmTargetPropCommandBase.h
+++ b/Source/cmTargetPropCommandBase.h
@@ -44,7 +44,7 @@ private:
virtual void HandleImportedTarget(const std::string &tgt) = 0;
virtual void HandleMissingTarget(const std::string &name) = 0;
- virtual void HandleDirectContent(cmTarget *tgt,
+ virtual bool HandleDirectContent(cmTarget *tgt,
const std::vector<std::string> &content,
bool prepend, bool system) = 0;
@@ -52,7 +52,7 @@ private:
bool ProcessContentArgs(std::vector<std::string> const& args,
unsigned int &argIndex, bool prepend, bool system);
- void PopulateTargetProperies(const std::string &scope,
+ bool PopulateTargetProperies(const std::string &scope,
const std::vector<std::string> &content,
bool prepend, bool system);
};
diff --git a/Source/cmTargetSourcesCommand.cxx b/Source/cmTargetSourcesCommand.cxx
index e82b36d..ce3b11e 100644
--- a/Source/cmTargetSourcesCommand.cxx
+++ b/Source/cmTargetSourcesCommand.cxx
@@ -56,9 +56,10 @@ std::string cmTargetSourcesCommand
}
//----------------------------------------------------------------------------
-void cmTargetSourcesCommand
+bool cmTargetSourcesCommand
::HandleDirectContent(cmTarget *tgt, const std::vector<std::string> &content,
bool, bool)
{
tgt->AppendProperty("SOURCES", this->Join(content).c_str());
+ return true;
}
diff --git a/Source/cmTargetSourcesCommand.h b/Source/cmTargetSourcesCommand.h
index dae78c4..a170e36 100644
--- a/Source/cmTargetSourcesCommand.h
+++ b/Source/cmTargetSourcesCommand.h
@@ -45,7 +45,7 @@ private:
virtual void HandleImportedTarget(const std::string &tgt);
virtual void HandleMissingTarget(const std::string &name);
- virtual void HandleDirectContent(cmTarget *tgt,
+ virtual bool HandleDirectContent(cmTarget *tgt,
const std::vector<std::string> &content,
bool prepend, bool system);