diff options
author | Brad King <brad.king@kitware.com> | 2010-12-07 21:23:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-08 22:29:20 (GMT) |
commit | 542b517449e8c7101ac6fbd316749bd461b48588 (patch) | |
tree | ce8295801336eee3b7cfb4a7d0427f4ec533c74a /Source/cmCustomCommandGenerator.h | |
parent | 6fe5b3db0b2ca3f9203a54589de0d744d59744c0 (diff) | |
download | CMake-542b517449e8c7101ac6fbd316749bd461b48588.zip CMake-542b517449e8c7101ac6fbd316749bd461b48588.tar.gz CMake-542b517449e8c7101ac6fbd316749bd461b48588.tar.bz2 |
Factor out common custom command generator
The Makefile, VS, and Xcode generators previously duplicated some custom
command line generation code. Factor this out into a separate class
cmCustomCommandGenerator shared by all generators.
Diffstat (limited to 'Source/cmCustomCommandGenerator.h')
-rw-r--r-- | Source/cmCustomCommandGenerator.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h new file mode 100644 index 0000000..5417ec5 --- /dev/null +++ b/Source/cmCustomCommandGenerator.h @@ -0,0 +1,37 @@ +/*============================================================================ + CMake - Cross Platform Makefile Generator + Copyright 2000-2010 Kitware, Inc., Insight Software Consortium + + Distributed under the OSI-approved BSD License (the "License"); + see accompanying file Copyright.txt for details. + + This software is distributed WITHOUT ANY WARRANTY; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License for more information. +============================================================================*/ +#ifndef cmCustomCommandGenerator_h +#define cmCustomCommandGenerator_h + +#include "cmStandardIncludes.h" + +class cmCustomCommand; +class cmMakefile; +class cmLocalGenerator; + +class cmCustomCommandGenerator +{ + cmCustomCommand const& CC; + const char* Config; + cmMakefile* Makefile; + cmLocalGenerator* LG; + bool OldStyle; + bool MakeVars; +public: + cmCustomCommandGenerator(cmCustomCommand const& cc, const char* config, + cmMakefile* mf); + unsigned int GetNumberOfCommands() const; + std::string GetCommand(unsigned int c) const; + void AppendArguments(unsigned int c, std::string& cmd) const; +}; + +#endif |