summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-04-27 18:13:02 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-27 18:14:36 (GMT)
commitd931ce9fe0c26cfddb766901cfd1ccbc9def71c7 (patch)
treee4644987b19c1ff0061dff199e2525268b81be91 /Source/cmGlobalVisualStudio10Generator.h
parentb2e7c7aef0375d5d676632d8cc3a7c2d96d6a8fa (diff)
downloadCMake-d931ce9fe0c26cfddb766901cfd1ccbc9def71c7.zip
CMake-d931ce9fe0c26cfddb766901cfd1ccbc9def71c7.tar.gz
CMake-d931ce9fe0c26cfddb766901cfd1ccbc9def71c7.tar.bz2
VS10: Generate relative source paths when possible (#12570)
Since commit ed0075bd (Use relative paths for custom command inputs, 2011-06-22) CMake generates full paths to source files in VS 10 project files to avoid trouble with deep source/build tree paths. However, the VS 10 IDE will not populate the source file property dialog for a file referenced by full path. Instead use a relative path when possible. When not possible produce a detailed warning explaining the problem and suggesting use of shorter directory paths.
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.h')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index e2cc14e..4236563 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -46,6 +46,8 @@ public:
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();
+ virtual void Generate();
+
/**
* Try to determine system infomation such as shared library
* extension, pthreads, byte order etc.
@@ -79,10 +81,22 @@ public:
/** Generate an <output>.rule file path for a given command output. */
virtual std::string GenerateRuleFile(std::string const& output) const;
+ void PathTooLong(cmTarget* target, cmSourceFile* sf,
+ std::string const& sfRel);
protected:
virtual const char* GetIDEVersion() { return "10.0"; }
std::string PlatformToolset;
bool ExpressEdition;
+private:
+ struct LongestSourcePath
+ {
+ LongestSourcePath(): Length(0), Target(0), SourceFile(0) {}
+ size_t Length;
+ cmTarget* Target;
+ cmSourceFile* SourceFile;
+ std::string SourceRel;
+ };
+ LongestSourcePath LongestSource;
};
#endif