summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-02-12 09:35:28 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-02-12 09:39:35 (GMT)
commit5b88504f650c7bcd3d404853b26292b50fa6f141 (patch)
treef628cdf768e2549b7569edacb0eb4cb759f03471
parentb030323c133155c57437527d04ca2ba619663f6d (diff)
downloadCMake-5b88504f650c7bcd3d404853b26292b50fa6f141.zip
CMake-5b88504f650c7bcd3d404853b26292b50fa6f141.tar.gz
CMake-5b88504f650c7bcd3d404853b26292b50fa6f141.tar.bz2
Rename the IncludeDirectoriesEntry to be more generic.
-rw-r--r--Source/cmListFileCache.h9
-rw-r--r--Source/cmMakefile.cxx12
-rw-r--r--Source/cmMakefile.h7
-rw-r--r--Source/cmMakefileIncludeDirectoriesEntry.h28
-rw-r--r--Source/cmTarget.cxx6
-rw-r--r--Source/cmTarget.h4
-rw-r--r--Source/cmTargetCompileDefinitionsCommand.cxx2
-rw-r--r--Source/cmTargetIncludeDirectoriesCommand.cxx4
8 files changed, 23 insertions, 49 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index c057754..fec3d07 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -76,4 +76,13 @@ struct cmListFile
std::vector<cmListFileFunction> Functions;
};
+struct cmValueWithOrigin {
+ cmValueWithOrigin(const std::string &value,
+ const cmListFileBacktrace &bt)
+ : Value(value), Backtrace(bt)
+ {}
+ std::string Value;
+ cmListFileBacktrace Backtrace;
+};
+
#endif
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 299e564..25ccbc7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1487,7 +1487,7 @@ void cmMakefile::InitializeFromParent()
// Initialize definitions with the closure of the parent scope.
this->Internal->VarStack.top() = parent->Internal->VarStack.top().Closure();
- const std::vector<IncludeDirectoriesEntry> parentIncludes =
+ const std::vector<cmValueWithOrigin> parentIncludes =
parent->GetIncludeDirectoriesEntries();
this->IncludeDirectoriesEntries.insert(this->IncludeDirectoriesEntries.end(),
parentIncludes.begin(),
@@ -1636,13 +1636,13 @@ void cmMakefile::AddIncludeDirectories(const std::vector<std::string> &incs,
sep = ";";
}
- std::vector<IncludeDirectoriesEntry>::iterator position =
+ std::vector<cmValueWithOrigin>::iterator position =
before ? this->IncludeDirectoriesEntries.begin()
: this->IncludeDirectoriesEntries.end();
cmListFileBacktrace lfbt;
this->GetBacktrace(lfbt);
- IncludeDirectoriesEntry entry(incString, lfbt);
+ cmValueWithOrigin entry(incString, lfbt);
this->IncludeDirectoriesEntries.insert(position, entry);
// Property on each target:
@@ -3461,7 +3461,7 @@ void cmMakefile::SetProperty(const char* prop, const char* value)
cmListFileBacktrace lfbt;
this->GetBacktrace(lfbt);
this->IncludeDirectoriesEntries.push_back(
- IncludeDirectoriesEntry(value, lfbt));
+ cmValueWithOrigin(value, lfbt));
return;
}
@@ -3500,7 +3500,7 @@ void cmMakefile::AppendProperty(const char* prop, const char* value,
cmListFileBacktrace lfbt;
this->GetBacktrace(lfbt);
this->IncludeDirectoriesEntries.push_back(
- IncludeDirectoriesEntry(value, lfbt));
+ cmValueWithOrigin(value, lfbt));
return;
}
if ( propname == "LINK_DIRECTORIES" )
@@ -3617,7 +3617,7 @@ const char *cmMakefile::GetProperty(const char* prop,
else if (!strcmp("INCLUDE_DIRECTORIES",prop))
{
std::string sep;
- for (std::vector<IncludeDirectoriesEntry>::const_iterator
+ for (std::vector<cmValueWithOrigin>::const_iterator
it = this->IncludeDirectoriesEntries.begin(),
end = this->IncludeDirectoriesEntries.end();
it != end; ++it)
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index c0020bf..74a731d 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -22,7 +22,6 @@
#include "cmNewLineStyle.h"
#include "cmGeneratorTarget.h"
#include "cmake.h"
-#include "cmMakefileIncludeDirectoriesEntry.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmSourceGroup.h"
@@ -863,9 +862,7 @@ public:
/** Set whether or not to report a CMP0000 violation. */
void SetCheckCMP0000(bool b) { this->CheckCMP0000 = b; }
- typedef cmMakefileIncludeDirectoriesEntry IncludeDirectoriesEntry;
-
- std::vector<IncludeDirectoriesEntry> GetIncludeDirectoriesEntries() const
+ std::vector<cmValueWithOrigin> GetIncludeDirectoriesEntries() const
{
return this->IncludeDirectoriesEntries;
}
@@ -921,7 +918,7 @@ protected:
std::vector<std::string> HeaderFileExtensions;
std::string DefineFlags;
- std::vector<IncludeDirectoriesEntry> IncludeDirectoriesEntries;
+ std::vector<cmValueWithOrigin> IncludeDirectoriesEntries;
// Track the value of the computed DEFINITIONS property.
void AddDefineFlag(const char*, std::string&);
diff --git a/Source/cmMakefileIncludeDirectoriesEntry.h b/Source/cmMakefileIncludeDirectoriesEntry.h
deleted file mode 100644
index f35642d..0000000
--- a/Source/cmMakefileIncludeDirectoriesEntry.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*============================================================================
- CMake - Cross Platform Makefile Generator
- Copyright 2012 Stephen Kelly <steveire@gmail.com>
-
- Distributed under the OSI-approved BSD License (the "License");
- see accompanying file Copyright.txt for details.
-
- This software is distributed WITHOUT ANY WARRANTY; without even the
- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the License for more information.
-============================================================================*/
-
-#ifndef cmMakefileIncludeDirectoriesEntry_h
-#define cmMakefileIncludeDirectoriesEntry_h
-
-#include <string>
-#include "cmListFileCache.h"
-
-struct cmMakefileIncludeDirectoriesEntry {
- cmMakefileIncludeDirectoriesEntry(const std::string &value,
- const cmListFileBacktrace &bt)
- : Value(value), Backtrace(bt)
- {}
- std::string Value;
- cmListFileBacktrace Backtrace;
-};
-
-#endif
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index bf918d5..6da6957 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1496,10 +1496,10 @@ void cmTarget::SetMakefile(cmMakefile* mf)
// Initialize the INCLUDE_DIRECTORIES property based on the current value
// of the same directory property:
- const std::vector<cmMakefileIncludeDirectoriesEntry> parentIncludes =
+ const std::vector<cmValueWithOrigin> parentIncludes =
this->Makefile->GetIncludeDirectoriesEntries();
- for (std::vector<cmMakefileIncludeDirectoriesEntry>::const_iterator it
+ for (std::vector<cmValueWithOrigin>::const_iterator it
= parentIncludes.begin(); it != parentIncludes.end(); ++it)
{
this->InsertInclude(*it);
@@ -2743,7 +2743,7 @@ void cmTarget::AppendBuildInterfaceIncludes()
}
//----------------------------------------------------------------------------
-void cmTarget::InsertInclude(const cmMakefileIncludeDirectoriesEntry &entry,
+void cmTarget::InsertInclude(const cmValueWithOrigin &entry,
bool before)
{
cmGeneratorExpression ge(entry.Backtrace);
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index fb1496f..028a55e 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -15,7 +15,7 @@
#include "cmCustomCommand.h"
#include "cmPropertyMap.h"
#include "cmPolicies.h"
-#include "cmMakefileIncludeDirectoriesEntry.h"
+#include "cmListFileCache.h"
#include <cmsys/auto_ptr.hxx>
@@ -493,7 +493,7 @@ public:
std::string GetFrameworkDirectory(const char* config = 0);
std::vector<std::string> GetIncludeDirectories(const char *config);
- void InsertInclude(const cmMakefileIncludeDirectoriesEntry &entry,
+ void InsertInclude(const cmValueWithOrigin &entry,
bool before = false);
void AppendBuildInterfaceIncludes();
diff --git a/Source/cmTargetCompileDefinitionsCommand.cxx b/Source/cmTargetCompileDefinitionsCommand.cxx
index 7645833..ba0ad59 100644
--- a/Source/cmTargetCompileDefinitionsCommand.cxx
+++ b/Source/cmTargetCompileDefinitionsCommand.cxx
@@ -11,8 +11,6 @@
============================================================================*/
#include "cmTargetCompileDefinitionsCommand.h"
-#include "cmMakefileIncludeDirectoriesEntry.h"
-
bool cmTargetCompileDefinitionsCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
diff --git a/Source/cmTargetIncludeDirectoriesCommand.cxx b/Source/cmTargetIncludeDirectoriesCommand.cxx
index 808806a..12d0a51 100644
--- a/Source/cmTargetIncludeDirectoriesCommand.cxx
+++ b/Source/cmTargetIncludeDirectoriesCommand.cxx
@@ -11,8 +11,6 @@
============================================================================*/
#include "cmTargetIncludeDirectoriesCommand.h"
-#include "cmMakefileIncludeDirectoriesEntry.h"
-
//----------------------------------------------------------------------------
bool cmTargetIncludeDirectoriesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
@@ -71,6 +69,6 @@ void cmTargetIncludeDirectoriesCommand
{
cmListFileBacktrace lfbt;
this->Makefile->GetBacktrace(lfbt);
- cmMakefileIncludeDirectoriesEntry entry(this->Join(content), lfbt);
+ cmValueWithOrigin entry(this->Join(content), lfbt);
tgt->InsertInclude(entry, prepend);
}