1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmSourceGroupCommand.h,v $
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.16 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmSourceGroupCommand_h
18 #define cmSourceGroupCommand_h
20 #include "cmCommand.h"
22 /** \class cmSourceGroupCommand
23 * \brief Adds a cmSourceGroup to the cmMakefile.
25 * cmSourceGroupCommand is used to define cmSourceGroups which split up
26 * source files in to named, organized groups in the generated makefiles.
28 class cmSourceGroupCommand
: public cmCommand
32 * This is a virtual constructor for the command.
34 virtual cmCommand
* Clone()
36 return new cmSourceGroupCommand
;
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector
<std::string
> const& args
,
44 cmExecutionStatus
&status
);
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() {return "source_group";}
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return "Define a grouping for sources in the makefile.";
62 virtual const char* GetFullDocumentation()
65 " source_group(name [REGULAR_EXPRESSION regex] "
66 "[FILES src1 src2 ...])\n"
67 "Defines a group into which sources will be placed in project files. "
68 "This is mainly used to setup file tabs in Visual Studio. "
69 "Any file whose name is listed or matches the regular expression will "
70 "be placed in this group. If a file matches multiple groups, the LAST "
71 "group that explicitly lists the file will be favored, if any. If no "
72 "group explicitly lists the file, the LAST group whose regular "
73 "expression matches the file will be favored.\n"
74 "The name of the group may contain backslashes to specify subgroups:\n"
75 " source_group(outer\\\\inner ...)\n"
76 "For backwards compatibility, this command is also supports the "
78 " source_group(name regex)";
81 cmTypeMacro(cmSourceGroupCommand
, cmCommand
);