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 cmSetSourceFilesPropertiesCommand_h
13 #define cmSetSourceFilesPropertiesCommand_h
15 #include "cmCommand.h"
17 class cmSetSourceFilesPropertiesCommand : public cmCommand
20 virtual cmCommand* Clone()
22 return new cmSetSourceFilesPropertiesCommand;
26 * This is called when the command is first encountered in
29 virtual bool InitialPass(std::vector<std::string> const& args,
30 cmExecutionStatus &status);
33 * The name of the command as specified in CMakeList.txt.
35 virtual const char* GetName() const { return "set_source_files_properties";}
38 * Succinct documentation.
40 virtual const char* GetTerseDocumentation() const
42 return "Source files can have properties that affect how they are built.";
46 * Longer documentation.
48 virtual const char* GetFullDocumentation() const
51 " set_source_files_properties([file1 [file2 [...]]]\n"
52 " PROPERTIES prop1 value1\n"
53 " [prop2 value2 [...]])\n"
54 "Set properties associated with source files using a key/value "
56 "See properties documentation for those known to CMake. "
57 "Unrecognized properties are ignored. "
58 "Source file properties are visible only to targets "
59 "added in the same directory (CMakeLists.txt).";
62 cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand);
64 static bool RunCommand(cmMakefile *mf,
65 std::vector<std::string>::const_iterator filebeg,
66 std::vector<std::string>::const_iterator fileend,
67 std::vector<std::string>::const_iterator propbeg,
68 std::vector<std::string>::const_iterator propend,