1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmSetSourceFilesPropertiesCommand.h,v $
6 Date: $Date: 2008-03-01 02:33:04 $
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 cmSetSourceFilesPropertiesCommand_h
18 #define cmSetSourceFilesPropertiesCommand_h
20 #include "cmCommand.h"
22 class cmSetSourceFilesPropertiesCommand
: public cmCommand
25 virtual cmCommand
* Clone()
27 return new cmSetSourceFilesPropertiesCommand
;
31 * This is called when the command is first encountered in
34 virtual bool InitialPass(std::vector
<std::string
> const& args
,
35 cmExecutionStatus
&status
);
38 * The name of the command as specified in CMakeList.txt.
40 virtual const char* GetName() { return "set_source_files_properties";}
43 * Succinct documentation.
45 virtual const char* GetTerseDocumentation()
47 return "Source files can have properties that affect how they are built.";
51 * Longer documentation.
53 virtual const char* GetFullDocumentation()
56 " set_source_files_properties(file1 file2 ...\n"
57 " PROPERTIES prop1 value1\n"
58 " prop2 value2 ...)\n"
59 "Set properties on a file. The syntax for the command is to list all "
61 "to change, and then provide the values you want to set next. You "
62 "can make up your own properties as well. "
63 "The following are used by CMake. "
64 "The ABSTRACT flag (boolean) is used by some class wrapping "
66 "If WRAP_EXCLUDE (boolean) is true then many wrapping commands "
67 "will ignore this file. If GENERATED (boolean) is true then it "
68 "is not an error if this source file does not exist when it is "
69 "added to a target. Obviously, "
70 "it must be created (presumably by a custom command) before the "
72 "If the HEADER_FILE_ONLY (boolean) property is true then the "
73 "file is not compiled. This is useful if you want to add extra "
74 "non build files to an IDE. "
75 "OBJECT_DEPENDS (string) adds dependencies to the object file. "
76 "COMPILE_FLAGS (string) is passed to the compiler as additional "
77 "command line arguments when the source file is compiled. "
78 "LANGUAGE (string) CXX|C will change the default compiler used "
79 "to compile the source file. The languages used need to be enabled "
80 "in the PROJECT command. "
81 "If SYMBOLIC (boolean) is set to true the build system will be "
82 "informed that the source file is not actually created on disk but "
83 "instead used as a symbolic name for a build rule.";
87 cmTypeMacro(cmSetSourceFilesPropertiesCommand
, cmCommand
);
89 static bool RunCommand(cmMakefile
*mf
,
90 std::vector
<std::string
>::const_iterator filebeg
,
91 std::vector
<std::string
>::const_iterator fileend
,
92 std::vector
<std::string
>::const_iterator propbeg
,
93 std::vector
<std::string
>::const_iterator propend
,