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 cmIDEOptions_h
13 #define cmIDEOptions_h
15 #include "cmStandardIncludes.h"
16 #include "cmIDEFlagTable.h"
18 /** \class cmIDEOptions
19 * \brief Superclass for IDE option processing
25 virtual ~cmIDEOptions();
27 // Store definitions and flags.
28 void AddDefine(const std::string& define);
29 void AddDefines(const char* defines);
30 void AddDefines(const std::vector<std::string> &defines);
31 void AddFlag(const char* flag, const char* value);
32 void RemoveFlag(const char* flag);
33 const char* GetFlag(const char* flag);
36 // create a map of xml tags to the values they should have in the output
37 // for example, "BufferSecurityCheck" = "TRUE"
38 // first fill this table with the values for the configuration
39 // Debug, Release, etc,
40 // Then parse the command line flags specified in CMAKE_CXX_FLAGS
42 // and overwrite or add new values to this map
43 std::map<cmStdString, cmStdString> FlagMap;
45 // Preprocessor definitions.
46 std::vector<std::string> Defines;
48 // Unrecognized flags that get no special handling.
49 cmStdString FlagString;
54 enum { FlagTableCount = 16 };
55 cmIDEFlagTable const* FlagTable[FlagTableCount];
56 void HandleFlag(const char* flag);
57 bool CheckFlagTable(cmIDEFlagTable const* table, const char* flag,
59 virtual void StoreUnknownFlag(const char* flag) = 0;