summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-12 13:32:08 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-12 13:32:08 (GMT)
commita4b9adec893b7cbce41fbffe65564f80b05e5746 (patch)
tree29f75b9f3d04f50db3bb2ca9588e91803b7c3c0e /Source/cmTarget.cxx
parenta1e22f691792d0c3bcc895ae30f676c6e90167fa (diff)
parentdcac9be6aa33601db1b32f4efd9f724a97f8844b (diff)
downloadCMake-a4b9adec893b7cbce41fbffe65564f80b05e5746.zip
CMake-a4b9adec893b7cbce41fbffe65564f80b05e5746.tar.gz
CMake-a4b9adec893b7cbce41fbffe65564f80b05e5746.tar.bz2
Merge topic 'constify'
dcac9be Make accessors for compile-related information const. 19a8a3c cmTarget: Don't finalize include directories in GetIncludeDirectories. 3305364 cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d5e8420..c9905b6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -138,16 +138,16 @@ public:
std::vector<TargetPropertyEntry*> CompileDefinitionsEntries;
std::vector<cmValueWithOrigin> LinkInterfacePropertyEntries;
- std::map<std::string, std::vector<TargetPropertyEntry*> >
+ mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
CachedLinkInterfaceIncludeDirectoriesEntries;
- std::map<std::string, std::vector<TargetPropertyEntry*> >
+ mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
CachedLinkInterfaceCompileOptionsEntries;
- std::map<std::string, std::vector<TargetPropertyEntry*> >
+ mutable std::map<std::string, std::vector<TargetPropertyEntry*> >
CachedLinkInterfaceCompileDefinitionsEntries;
- std::map<std::string, bool> CacheLinkInterfaceIncludeDirectoriesDone;
- std::map<std::string, bool> CacheLinkInterfaceCompileDefinitionsDone;
- std::map<std::string, bool> CacheLinkInterfaceCompileOptionsDone;
+ mutable std::map<std::string, bool> CacheLinkInterfaceIncludeDirectoriesDone;
+ mutable std::map<std::string, bool> CacheLinkInterfaceCompileDefinitionsDone;
+ mutable std::map<std::string, bool> CacheLinkInterfaceCompileOptionsDone;
};
//----------------------------------------------------------------------------
@@ -1593,7 +1593,7 @@ void cmTarget::InsertCompileDefinition(const cmValueWithOrigin &entry,
}
//----------------------------------------------------------------------------
-static void processIncludeDirectories(cmTarget *tgt,
+static void processIncludeDirectories(cmTarget const* tgt,
const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries,
std::vector<std::string> &includes,
std::set<std::string> &uniqueIncludes,
@@ -1762,7 +1762,8 @@ static void processIncludeDirectories(cmTarget *tgt,
}
//----------------------------------------------------------------------------
-std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
+std::vector<std::string>
+cmTarget::GetIncludeDirectories(const char *config) const
{
std::vector<std::string> includes;
std::set<std::string> uniqueIncludes;
@@ -1772,8 +1773,6 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
this->GetName(),
"INCLUDE_DIRECTORIES", 0, 0);
- this->AppendBuildInterfaceIncludes();
-
std::vector<std::string> debugProperties;
const char *debugProp =
this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
@@ -1896,7 +1895,7 @@ std::vector<std::string> cmTarget::GetIncludeDirectories(const char *config)
}
//----------------------------------------------------------------------------
-static void processCompileOptionsInternal(cmTarget *tgt,
+static void processCompileOptionsInternal(cmTarget const* tgt,
const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries,
std::vector<std::string> &options,
std::set<std::string> &uniqueOptions,
@@ -1955,7 +1954,7 @@ static void processCompileOptionsInternal(cmTarget *tgt,
}
//----------------------------------------------------------------------------
-static void processCompileOptions(cmTarget *tgt,
+static void processCompileOptions(cmTarget const* tgt,
const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries,
std::vector<std::string> &options,
std::set<std::string> &uniqueOptions,
@@ -1968,7 +1967,7 @@ static void processCompileOptions(cmTarget *tgt,
//----------------------------------------------------------------------------
void cmTarget::GetCompileOptions(std::vector<std::string> &result,
- const char *config)
+ const char *config) const
{
std::set<std::string> uniqueOptions;
cmListFileBacktrace lfbt;
@@ -2067,7 +2066,7 @@ void cmTarget::GetCompileOptions(std::vector<std::string> &result,
}
//----------------------------------------------------------------------------
-static void processCompileDefinitions(cmTarget *tgt,
+static void processCompileDefinitions(cmTarget const* tgt,
const std::vector<cmTargetInternals::TargetPropertyEntry*> &entries,
std::vector<std::string> &options,
std::set<std::string> &uniqueOptions,
@@ -2081,7 +2080,7 @@ static void processCompileDefinitions(cmTarget *tgt,
//----------------------------------------------------------------------------
void cmTarget::GetCompileDefinitions(std::vector<std::string> &list,
- const char *config)
+ const char *config) const
{
std::set<std::string> uniqueOptions;
cmListFileBacktrace lfbt;