2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
see accompanying file Copyright.txt for details.
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2009-09-28 19:43:28 +04:00
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the License for more information.
|
|
|
|
============================================================================*/
|
2009-06-26 00:41:57 +04:00
|
|
|
#ifndef cmVisualStudioGeneratorOptions_h
|
|
|
|
#define cmVisualStudioGeneratorOptions_h
|
|
|
|
|
2011-11-11 02:17:41 +04:00
|
|
|
#include "cmLocalVisualStudioGenerator.h"
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2009-07-29 19:29:08 +04:00
|
|
|
#include "cmIDEOptions.h"
|
2009-07-29 19:28:55 +04:00
|
|
|
typedef cmIDEFlagTable cmVS7FlagTable;
|
|
|
|
|
|
|
|
class cmVisualStudio10TargetGenerator;
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2009-07-29 19:29:08 +04:00
|
|
|
class cmVisualStudioGeneratorOptions: public cmIDEOptions
|
2009-06-26 00:41:57 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Construct an options table for a given tool.
|
|
|
|
enum Tool
|
|
|
|
{
|
|
|
|
Compiler,
|
2014-07-10 03:01:18 +04:00
|
|
|
ResourceCompiler,
|
2014-08-13 19:20:20 +04:00
|
|
|
MasmCompiler,
|
2009-06-26 00:41:57 +04:00
|
|
|
Linker,
|
|
|
|
FortranCompiler
|
|
|
|
};
|
2011-11-11 02:17:41 +04:00
|
|
|
cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
|
2009-06-26 00:41:57 +04:00
|
|
|
Tool tool,
|
|
|
|
cmVS7FlagTable const* table,
|
|
|
|
cmVS7FlagTable const* extraTable = 0,
|
|
|
|
cmVisualStudio10TargetGenerator* g = 0);
|
|
|
|
|
2014-11-14 21:47:00 +03:00
|
|
|
cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg,
|
|
|
|
Tool tool,
|
|
|
|
cmVisualStudio10TargetGenerator* g = 0);
|
|
|
|
|
|
|
|
// Add a table of flags.
|
|
|
|
void AddTable(cmVS7FlagTable const* table);
|
|
|
|
|
2009-06-26 00:41:57 +04:00
|
|
|
// Store options from command line flags.
|
|
|
|
void Parse(const char* flags);
|
2010-11-10 01:54:40 +03:00
|
|
|
void ParseFinish();
|
2009-06-26 00:41:57 +04: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 23:16:54 +04:00
|
|
|
bool UsingUnicode() const;
|
|
|
|
bool UsingSBCS() const;
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2013-08-05 23:16:54 +04:00
|
|
|
bool IsDebug() const;
|
2014-08-11 22:21:16 +04:00
|
|
|
bool IsWinRt() const;
|
2009-06-26 00:41:57 +04:00
|
|
|
// Write options to output.
|
|
|
|
void OutputPreprocessorDefinitions(std::ostream& fout,
|
|
|
|
const char* prefix,
|
2011-01-26 02:54:36 +03:00
|
|
|
const char* suffix,
|
2014-02-04 06:20:56 +04:00
|
|
|
const std::string& lang);
|
2009-06-26 00:41:57 +04:00
|
|
|
void OutputFlagMap(std::ostream& fout, const char* indent);
|
|
|
|
void OutputAdditionalOptions(std::ostream& fout,
|
|
|
|
const char* prefix,
|
|
|
|
const char* suffix);
|
|
|
|
void SetConfiguration(const char* config);
|
|
|
|
private:
|
2011-11-11 02:17:41 +04:00
|
|
|
cmLocalVisualStudioGenerator* LocalGenerator;
|
2015-05-17 12:33:09 +03:00
|
|
|
cmGlobalVisualStudioGenerator::VSVersion Version;
|
2009-06-26 00:41:57 +04:00
|
|
|
|
|
|
|
std::string Configuration;
|
|
|
|
Tool CurrentTool;
|
2009-07-29 19:29:08 +04:00
|
|
|
cmVisualStudio10TargetGenerator* TargetGenerator;
|
|
|
|
|
2010-11-10 01:54:40 +03:00
|
|
|
bool FortranRuntimeDebug;
|
|
|
|
bool FortranRuntimeDLL;
|
|
|
|
bool FortranRuntimeMT;
|
|
|
|
|
2009-07-29 19:29:08 +04:00
|
|
|
virtual void StoreUnknownFlag(const char* flag);
|
2009-06-26 00:41:57 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|