summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmTarget.cxx8
-rw-r--r--Source/cmTarget.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index c9905b6..26b1e76 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -91,8 +91,8 @@ public:
}
~cmTargetInternals();
typedef cmTarget::SourceFileFlags SourceFileFlags;
- std::map<cmSourceFile const*, SourceFileFlags> SourceFlagsMap;
- bool SourceFileFlagsConstructed;
+ mutable std::map<cmSourceFile const*, SourceFileFlags> SourceFlagsMap;
+ mutable bool SourceFileFlagsConstructed;
// The backtrace when the target was created.
cmListFileBacktrace Backtrace;
@@ -577,7 +577,7 @@ void cmTarget::ProcessSourceExpression(std::string const& expr)
//----------------------------------------------------------------------------
struct cmTarget::SourceFileFlags
-cmTarget::GetTargetSourceFileFlags(const cmSourceFile* sf)
+cmTarget::GetTargetSourceFileFlags(const cmSourceFile* sf) const
{
struct SourceFileFlags flags;
this->ConstructSourceFileFlags();
@@ -591,7 +591,7 @@ cmTarget::GetTargetSourceFileFlags(const cmSourceFile* sf)
}
//----------------------------------------------------------------------------
-void cmTarget::ConstructSourceFileFlags()
+void cmTarget::ConstructSourceFileFlags() const
{
if(this->Internal->SourceFileFlagsConstructed)
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index bafcb15..e67edd7 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -162,7 +162,8 @@ public:
/**
* Get the flags for a given source file as used in this target
*/
- struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf);
+ struct SourceFileFlags
+ GetTargetSourceFileFlags(const cmSourceFile* sf) const;
/**
* Add sources to the target.
@@ -742,7 +743,7 @@ private:
friend class cmTargetTraceDependencies;
cmTargetInternalPointer Internal;
- void ConstructSourceFileFlags();
+ void ConstructSourceFileFlags() const;
void ComputeVersionedName(std::string& vName,
std::string const& prefix,
std::string const& base,