summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2012-04-25 18:03:01 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-04-25 18:03:01 (GMT)
commit728cbd19e3574d0a103ad17cacf98518c9b2c5bf (patch)
treedb09e6bf7eb0065286b819546c2eb58d35044f01 /Source/cmGlobalVisualStudio10Generator.cxx
parent21be162f9b33b0054e7dd7f5cb0ce93685ae08b3 (diff)
parent72333a464870155d040e215bec37a7a31070f875 (diff)
downloadCMake-728cbd19e3574d0a103ad17cacf98518c9b2c5bf.zip
CMake-728cbd19e3574d0a103ad17cacf98518c9b2c5bf.tar.gz
CMake-728cbd19e3574d0a103ad17cacf98518c9b2c5bf.tar.bz2
Merge topic 'vs10-rule-files'
72333a4 VS10: Avoid creating .rule files next to outputs (#13141) 369e346 Factor out custom command .rule file path generation f9b758e Cleanup custom command .rule file internal handling
Diffstat (limited to 'Source/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 22ead10..28d738a 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -212,3 +212,21 @@ bool cmGlobalVisualStudio10Generator::Find64BitTools(cmMakefile* mf)
return false;
}
}
+
+//----------------------------------------------------------------------------
+std::string
+cmGlobalVisualStudio10Generator
+::GenerateRuleFile(std::string const& output) const
+{
+ // The VS 10 generator needs to create the .rule files on disk.
+ // Hide them away under the CMakeFiles directory.
+ std::string ruleDir = this->GetCMakeInstance()->GetHomeOutputDirectory();
+ ruleDir += cmake::GetCMakeFilesDirectory();
+ ruleDir += "/";
+ ruleDir += cmSystemTools::ComputeStringMD5(
+ cmSystemTools::GetFilenamePath(output).c_str());
+ std::string ruleFile = ruleDir + "/";
+ ruleFile += cmSystemTools::GetFilenameName(output);
+ ruleFile += ".rule";
+ return ruleFile;
+}