summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-04-27 13:21:08 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-27 14:00:00 (GMT)
commitc2ba6ba4fc0d807f36a6a9fcb1c166b776750dae (patch)
treec41b8db0a92d55295249cb6164a9e8797a99a542 /Source/cmVisualStudio10TargetGenerator.h
parent4f2d9d2da56b13b5780387492a400baa03d5bf70 (diff)
downloadCMake-c2ba6ba4fc0d807f36a6a9fcb1c166b776750dae.zip
CMake-c2ba6ba4fc0d807f36a6a9fcb1c166b776750dae.tar.gz
CMake-c2ba6ba4fc0d807f36a6a9fcb1c166b776750dae.tar.bz2
VS10: Simplify vcxproj.filter file generation
Remove the duplicate source file classification logic used to generate the filter files. Instead record during the main vcxproj file generation the source files generated for each tool. Also record whether or not each source file is converted to a relative path. Use the recorded result during filter generation to ensure consistency between the project file and filter file.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.h')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h
index 1e0f9c1..c00d328 100644
--- a/Source/cmVisualStudio10TargetGenerator.h
+++ b/Source/cmVisualStudio10TargetGenerator.h
@@ -43,6 +43,13 @@ public:
);
private:
+ struct ToolSource
+ {
+ cmSourceFile* SourceFile;
+ bool RelativePath;
+ };
+ struct ToolSources: public std::vector<ToolSource> {};
+
void ConvertToWindowsSlash(std::string& s);
void WriteString(const char* line, int indentLevel);
void WriteProjectConfigurations();
@@ -77,8 +84,7 @@ private:
void WriteEvents(std::string const& configName);
void WriteEvent(const char* name, std::vector<cmCustomCommand> & commands,
std::string const& configName);
- void WriteGroupSources(const char* name,
- std::vector<cmSourceFile*> const& sources,
+ void WriteGroupSources(const char* name, ToolSources const& sources,
std::vector<cmSourceGroup>& );
void AddMissingSourceGroups(std::set<cmSourceGroup*>& groupsUsed,
const std::vector<cmSourceGroup>& allGroups);
@@ -99,6 +105,9 @@ private:
cmGeneratedFileStream* BuildFileStream;
cmLocalVisualStudio7Generator* LocalGenerator;
std::set<cmSourceFile*> SourcesVisited;
+
+ typedef std::map<cmStdString, ToolSources> ToolSourceMap;
+ ToolSourceMap Tools;
};
#endif