1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2013 Stephen Kelly <steveire@gmail.com>
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 cmAddCompileOptionsCommand_h
13 #define cmAddCompileOptionsCommand_h
15 #include "cmCommand.h"
16 #include "cmDocumentGeneratorExpressions.h"
18 class cmAddCompileOptionsCommand : public cmCommand
22 * This is a virtual constructor for the command.
24 virtual cmCommand* Clone()
26 return new cmAddCompileOptionsCommand;
30 * This is called when the command is first encountered in
31 * the CMakeLists.txt file.
33 virtual bool InitialPass(std::vector<std::string> const& args,
34 cmExecutionStatus &status);
37 * The name of the command as specified in CMakeList.txt.
39 virtual const char* GetName() const {return "add_compile_options";}
42 * Succinct documentation.
44 virtual const char* GetTerseDocumentation() const
46 return "Adds options to the compilation of source files.";
52 virtual const char* GetFullDocumentation() const
55 " add_compile_options(<option> ...)\n"
56 "Adds options to the compiler command line for sources in the "
57 "current directory and below. This command can be used to add any "
58 "options, but alternative commands exist to add preprocessor "
59 "definitions or include directories. "
60 "See documentation of the directory and target COMPILE_OPTIONS "
61 "properties for details. "
62 "Arguments to add_compile_options may use \"generator "
63 "expressions\" with the syntax \"$<...>\". "
64 CM_DOCUMENT_COMMAND_GENERATOR_EXPRESSIONS
68 cmTypeMacro(cmAddCompileOptionsCommand, cmCommand);