2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2009-06-25 20:41:57 +00:00
|
|
|
#ifndef cmVisualStudioGeneratorOptions_h
|
|
|
|
#define cmVisualStudioGeneratorOptions_h
|
|
|
|
|
2016-11-25 21:54:58 +00:00
|
|
|
#include <cmConfigure.h>
|
2009-06-25 20:41:57 +00:00
|
|
|
|
2016-11-25 21:54:58 +00:00
|
|
|
#include <iosfwd>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "cmGlobalVisualStudioGenerator.h"
|
|
|
|
#include "cmIDEFlagTable.h"
|
2009-07-29 15:29:08 +00:00
|
|
|
#include "cmIDEOptions.h"
|
2016-11-25 21:54:58 +00:00
|
|
|
|
|
|
|
class cmLocalVisualStudioGenerator;
|
|
|
|
|
2009-07-29 15:28:55 +00:00
|
|
|
typedef cmIDEFlagTable cmVS7FlagTable;
|
|
|
|
|
|
|
|
class cmVisualStudio10TargetGenerator;
|
2009-06-25 20:41:57 +00:00
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
class cmVisualStudioGeneratorOptions : public cmIDEOptions
|
2009-06-25 20:41:57 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Construct an options table for a given tool.
|
|
|
|
enum Tool
|
|
|
|
{
|
|
|
|
Compiler,
|
2014-07-09 23:01:18 +00:00
|
|
|
ResourceCompiler,
|
2014-08-13 15:20:20 +00:00
|
|
|
MasmCompiler,
|
2009-06-25 20:41:57 +00:00
|
|
|
Linker,
|
|
|
|
FortranCompiler
|
|
|
|
};
|
2016-05-16 14:34:04 +00:00
|
|
|
cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool,
|
2009-06-25 20:41:57 +00:00
|
|
|
cmVS7FlagTable const* table,
|
|
|
|
cmVS7FlagTable const* extraTable = 0,
|
|
|
|
cmVisualStudio10TargetGenerator* g = 0);
|
|
|
|
|
2016-05-16 14:34:04 +00:00
|
|
|
cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool,
|
2014-11-14 18:47:00 +00:00
|
|
|
cmVisualStudio10TargetGenerator* g = 0);
|
|
|
|
|
|
|
|
// Add a table of flags.
|
|
|
|
void AddTable(cmVS7FlagTable const* table);
|
|
|
|
|
2009-06-25 20:41:57 +00:00
|
|
|
// Store options from command line flags.
|
|
|
|
void Parse(const char* flags);
|
2010-11-09 22:54:40 +00:00
|
|
|
void ParseFinish();
|
2009-06-25 20:41:57 +00:00
|
|
|
|
|
|
|
// Fix the ExceptionHandling option to default to off.
|
|
|
|
void FixExceptionHandlingDefault();
|
|
|
|
|
|
|
|
// Store options for verbose builds.
|
|
|
|
void SetVerboseMakefile(bool verbose);
|
|
|
|
|
|
|
|
// Check for specific options.
|
2013-08-05 19:16:54 +00:00
|
|
|
bool UsingUnicode() const;
|
|
|
|
bool UsingSBCS() const;
|
2009-06-25 20:41:57 +00:00
|
|
|
|
2013-08-05 19:16:54 +00:00
|
|
|
bool IsDebug() const;
|
2014-08-11 18:21:16 +00:00
|
|
|
bool IsWinRt() const;
|
2016-09-23 10:15:40 +00:00
|
|
|
bool IsManaged() const;
|
2009-06-25 20:41:57 +00:00
|
|
|
// Write options to output.
|
2016-05-16 14:34:04 +00:00
|
|
|
void OutputPreprocessorDefinitions(std::ostream& fout, const char* prefix,
|
2011-01-25 23:54:36 +00:00
|
|
|
const char* suffix,
|
2014-02-04 02:20:56 +00:00
|
|
|
const std::string& lang);
|
2009-06-25 20:41:57 +00:00
|
|
|
void OutputFlagMap(std::ostream& fout, const char* indent);
|
2016-05-16 14:34:04 +00:00
|
|
|
void OutputAdditionalOptions(std::ostream& fout, const char* prefix,
|
2009-06-25 20:41:57 +00:00
|
|
|
const char* suffix);
|
|
|
|
void SetConfiguration(const char* config);
|
2016-05-16 14:34:04 +00:00
|
|
|
|
2009-06-25 20:41:57 +00:00
|
|
|
private:
|
2011-11-10 22:17:41 +00:00
|
|
|
cmLocalVisualStudioGenerator* LocalGenerator;
|
2015-05-17 09:33:09 +00:00
|
|
|
cmGlobalVisualStudioGenerator::VSVersion Version;
|
2009-06-25 20:41:57 +00:00
|
|
|
|
|
|
|
std::string Configuration;
|
|
|
|
Tool CurrentTool;
|
2009-07-29 15:29:08 +00:00
|
|
|
cmVisualStudio10TargetGenerator* TargetGenerator;
|
|
|
|
|
2010-11-09 22:54:40 +00:00
|
|
|
bool FortranRuntimeDebug;
|
|
|
|
bool FortranRuntimeDLL;
|
|
|
|
bool FortranRuntimeMT;
|
|
|
|
|
2009-07-29 15:29:08 +00:00
|
|
|
virtual void StoreUnknownFlag(const char* flag);
|
2009-06-25 20:41:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|