1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmOutputRequiredFilesCommand_h
13 #define cmOutputRequiredFilesCommand_h
15 #include "cmCommand.h"
16 #include "cmMakeDepend.h"
18 /** \class cmOutputRequiredFilesCommand
19 * \brief Output a list of required files for a source file
22 class cmOutputRequiredFilesCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmOutputRequiredFilesCommand;
34 * This is called when the command is first encountered in
35 * the CMakeLists.txt file.
37 virtual bool InitialPass(std::vector<std::string> const& args,
38 cmExecutionStatus &status);
41 * The name of the command as specified in CMakeList.txt.
43 virtual const char* GetName() const { return "output_required_files";}
46 * Succinct documentation.
48 virtual const char* GetTerseDocumentation() const
50 return "Deprecated. Approximate C preprocessor dependency scanning.";
56 virtual const char* GetFullDocumentation() const
59 "This command exists only because ancient CMake versions provided it. "
60 "CMake handles preprocessor dependency scanning automatically using a "
61 "more advanced scanner.\n"
62 " output_required_files(srcfile outputfile)\n"
63 "Outputs a list of all the source files that are required by the "
64 "specified srcfile. This list is written into outputfile. This is "
65 "similar to writing out the dependencies for srcfile except that it "
66 "jumps from .h files into .cxx, .c and .cpp files if possible.";
69 /** This command is kept for compatibility with older CMake versions. */
70 virtual bool IsDiscouraged() const
76 cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand);
77 void ListDependencies(cmDependInformation const *info,
79 std::set<cmDependInformation const*> *visited);
83 std::string OutputFile;