summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-12 10:56:58 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-13 14:12:31 (GMT)
commit3df36b5954bef70891a666756d325e8bb4d01c1a (patch)
tree055c8c03e49569ecb9319c3628ad23ca8017cfe3 /Source/cmExportFileGenerator.cxx
parente1f908015f943ed507063260b3aae1f3b503237e (diff)
downloadCMake-3df36b5954bef70891a666756d325e8bb4d01c1a.zip
CMake-3df36b5954bef70891a666756d325e8bb4d01c1a.tar.gz
CMake-3df36b5954bef70891a666756d325e8bb4d01c1a.tar.bz2
Revert "Add the $<LINKED:...> generator expression."
This reverts commit 0b92602b816e2584db3781b120a1e5200da72ada. Conflicts: Source/cmGeneratorExpressionEvaluator.cxx Tests/CMakeCommands/target_compile_definitions/CMakeLists.txt Tests/CMakeCommands/target_include_directories/CMakeLists.txt
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx66
1 files changed, 6 insertions, 60 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index fbed95a..ee8436c 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -25,8 +25,6 @@
#include <cmsys/auto_ptr.hxx>
-#include "assert.h"
-
//----------------------------------------------------------------------------
cmExportFileGenerator::cmExportFileGenerator()
{
@@ -162,7 +160,7 @@ void cmExportFileGenerator::PopulateInterfaceProperty(const char *propName,
preprocessRule);
if (!prepro.empty())
{
- this->ResolveTargetsInGeneratorExpressions(prepro, target, propName,
+ this->ResolveTargetsInGeneratorExpressions(prepro, target,
missingTargets);
properties[outputName] = prepro;
}
@@ -318,14 +316,13 @@ cmExportFileGenerator::AddTargetNamespace(std::string &input,
void
cmExportFileGenerator::ResolveTargetsInGeneratorExpressions(
std::string &input,
- cmTarget* target, const char *propName,
+ cmTarget* target,
std::vector<std::string> &missingTargets,
FreeTargetsReplace replace)
{
if (replace == NoReplaceFreeTargets)
{
- this->ResolveTargetsInGeneratorExpression(input, target, propName,
- missingTargets);
+ this->ResolveTargetsInGeneratorExpression(input, target, missingTargets);
return;
}
std::vector<std::string> parts;
@@ -344,7 +341,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions(
{
this->ResolveTargetsInGeneratorExpression(
*li,
- target, propName,
+ target,
missingTargets);
}
input += sep + *li;
@@ -356,7 +353,7 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpressions(
void
cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
std::string &input,
- cmTarget* target, const char *propName,
+ cmTarget* target,
std::vector<std::string> &missingTargets)
{
std::string::size_type pos = 0;
@@ -393,57 +390,6 @@ cmExportFileGenerator::ResolveTargetsInGeneratorExpression(
std::string errorString;
pos = 0;
lastPos = pos;
- while((pos = input.find("$<LINKED:", lastPos)) != input.npos)
- {
- std::string::size_type nameStartPos = pos + sizeof("$<LINKED:") - 1;
- std::string::size_type endPos = input.find(">", nameStartPos);
- if (endPos == input.npos)
- {
- errorString = "$<LINKED:...> expression incomplete";
- break;
- }
- std::string targetName = input.substr(nameStartPos,
- endPos - nameStartPos);
- if(targetName.find("$<") != input.npos)
- {
- errorString = "$<LINKED:...> requires its parameter to be a "
- "literal.";
- break;
- }
- if (this->AddTargetNamespace(targetName, target, missingTargets))
- {
- assert(propName); // The link libraries strings will
- // never contain $<LINKED>
- std::string replacement = "$<TARGET_PROPERTY:"
- + targetName + "," + propName;
- input.replace(pos, endPos - pos, replacement);
- lastPos = pos + replacement.size() + 1;
- }
- else
- {
- if (pos != 0)
- {
- if (input[pos - 1] == ';')
- {
- --pos;
- }
- }
- else if (input[endPos + 1] == ';')
- {
- ++endPos;
- }
- input.replace(pos, endPos - pos + 1, "");
- lastPos = pos;
- }
- }
- if (!errorString.empty())
- {
- mf->IssueMessage(cmake::FATAL_ERROR, errorString);
- return;
- }
-
- pos = 0;
- lastPos = pos;
while((pos = input.find("$<TARGET_NAME:", lastPos)) != input.npos)
{
std::string::size_type nameStartPos = pos + sizeof("$<TARGET_NAME:") - 1;
@@ -537,7 +483,7 @@ cmExportFileGenerator
preprocessRule);
if (!prepro.empty())
{
- this->ResolveTargetsInGeneratorExpressions(prepro, target, 0,
+ this->ResolveTargetsInGeneratorExpressions(prepro, target,
missingTargets,
ReplaceFreeTargets);
properties["IMPORTED_LINK_INTERFACE_LIBRARIES" + suffix] = prepro;