summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio8Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-04-18 18:42:43 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-18 19:48:50 (GMT)
commitf9b758e91a9afa17123c5b81b5568ebbd52db598 (patch)
tree33ebdb71d5986a7a3031a4f301110c57d83a90b6 /Source/cmGlobalVisualStudio8Generator.cxx
parent31e7fadbb3bfd225e0d48e2d072ccc745d7f2689 (diff)
downloadCMake-f9b758e91a9afa17123c5b81b5568ebbd52db598.zip
CMake-f9b758e91a9afa17123c5b81b5568ebbd52db598.tar.gz
CMake-f9b758e91a9afa17123c5b81b5568ebbd52db598.tar.bz2
Cleanup custom command .rule file internal handling
Teach cmMakefile::AddCustomCommandToOutput to return the cmSourceFile instance to which the custom command is attached. Use the return value instead of separately adding a .rule extension and searching for the source. Mark CMake-generated .rule files explicitly with a property instead of trusting the file extension.
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index a723109..ac70a9b 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -214,13 +214,11 @@ void cmGlobalVisualStudio8Generator::AddCheckTarget()
// (this could be avoided with per-target source files)
const char* no_main_dependency = 0;
const char* no_working_directory = 0;
- mf->AddCustomCommandToOutput(
- stamps, listFiles,
- no_main_dependency, commandLines, "Checking Build System",
- no_working_directory, true);
- std::string ruleName = stamps[0];
- ruleName += ".rule";
- if(cmSourceFile* file = mf->GetSource(ruleName.c_str()))
+ if(cmSourceFile* file =
+ mf->AddCustomCommandToOutput(
+ stamps, listFiles,
+ no_main_dependency, commandLines, "Checking Build System",
+ no_working_directory, true))
{
tgt->AddSourceFile(file);
}