2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2009-06-26 00:41:57 +04:00
|
|
|
#ifndef cmVisualStudioTargetGenerator_h
|
|
|
|
#define cmVisualStudioTargetGenerator_h
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2016-09-01 21:05:48 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2009-06-26 00:41:57 +04:00
|
|
|
#include "cmStandardIncludes.h"
|
|
|
|
|
|
|
|
class cmMakefile;
|
2012-03-07 20:56:21 +04:00
|
|
|
class cmGeneratorTarget;
|
2009-06-26 00:41:57 +04:00
|
|
|
class cmGeneratedFileStream;
|
2009-10-22 16:24:11 +04:00
|
|
|
class cmGlobalVisualStudio10Generator;
|
2009-06-26 00:41:57 +04:00
|
|
|
class cmSourceFile;
|
|
|
|
class cmCustomCommand;
|
|
|
|
class cmLocalVisualStudio7Generator;
|
|
|
|
class cmComputeLinkInformation;
|
2009-10-23 19:34:37 +04:00
|
|
|
class cmVisualStudioGeneratorOptions;
|
2014-06-03 21:34:21 +04:00
|
|
|
struct cmIDEFlagTable;
|
2009-07-11 08:05:20 +04:00
|
|
|
#include "cmSourceGroup.h"
|
2009-06-26 00:41:57 +04:00
|
|
|
|
|
|
|
class cmVisualStudio10TargetGenerator
|
|
|
|
{
|
|
|
|
public:
|
2015-10-22 19:27:57 +03:00
|
|
|
cmVisualStudio10TargetGenerator(cmGeneratorTarget* target,
|
2009-10-22 16:24:11 +04:00
|
|
|
cmGlobalVisualStudio10Generator* gg);
|
2009-06-26 00:41:57 +04:00
|
|
|
~cmVisualStudio10TargetGenerator();
|
|
|
|
void Generate();
|
2012-08-13 21:42:58 +04:00
|
|
|
// used by cmVisualStudioGeneratorOptions
|
2016-05-16 17:34:04 +03:00
|
|
|
void WritePlatformConfigTag(const char* tag, const std::string& config,
|
|
|
|
int indentLevel, const char* attribute = 0,
|
|
|
|
const char* end = 0, std::ostream* strm = 0);
|
2012-08-13 21:42:58 +04:00
|
|
|
|
2009-06-26 00:41:57 +04:00
|
|
|
private:
|
2012-04-27 17:21:08 +04:00
|
|
|
struct ToolSource
|
|
|
|
{
|
2014-03-13 02:50:42 +04:00
|
|
|
cmSourceFile const* SourceFile;
|
2012-04-27 17:21:08 +04:00
|
|
|
bool RelativePath;
|
|
|
|
};
|
2016-05-16 17:34:04 +03:00
|
|
|
struct ToolSources : public std::vector<ToolSource>
|
|
|
|
{
|
|
|
|
};
|
2012-04-27 17:21:08 +04:00
|
|
|
|
2012-04-27 18:42:23 +04:00
|
|
|
std::string ConvertPath(std::string const& path, bool forceRelative);
|
2009-06-26 00:41:57 +04:00
|
|
|
void ConvertToWindowsSlash(std::string& s);
|
|
|
|
void WriteString(const char* line, int indentLevel);
|
|
|
|
void WriteProjectConfigurations();
|
|
|
|
void WriteProjectConfigurationValues();
|
2014-06-05 22:57:23 +04:00
|
|
|
void WriteMSToolConfigurationValues(std::string const& config);
|
2014-07-29 21:36:53 +04:00
|
|
|
void WriteHeaderSource(cmSourceFile const* sf);
|
2014-07-29 21:32:22 +04:00
|
|
|
void WriteExtraSource(cmSourceFile const* sf);
|
2014-06-10 19:33:19 +04:00
|
|
|
void WriteNsightTegraConfigurationValues(std::string const& config);
|
2014-07-29 21:26:19 +04:00
|
|
|
void WriteSource(std::string const& tool, cmSourceFile const* sf,
|
2014-03-13 02:50:42 +04:00
|
|
|
const char* end = 0);
|
2014-07-29 21:26:19 +04:00
|
|
|
void WriteSources(std::string const& tool,
|
2014-03-13 02:06:05 +04:00
|
|
|
std::vector<cmSourceFile const*> const&);
|
2012-03-19 19:25:21 +04:00
|
|
|
void WriteAllSources();
|
2011-11-23 23:11:00 +04:00
|
|
|
void WriteDotNetReferences();
|
2013-06-28 11:04:01 +04:00
|
|
|
void WriteEmbeddedResourceGroup();
|
2012-02-03 18:07:12 +04:00
|
|
|
void WriteWinRTReferences();
|
2014-08-11 22:17:12 +04:00
|
|
|
void WriteWinRTPackageCertificateKeyFile();
|
2015-03-31 23:49:39 +03:00
|
|
|
void WriteXamlFilesGroup();
|
2009-06-26 00:41:57 +04:00
|
|
|
void WritePathAndIncrementalLinkOptions();
|
|
|
|
void WriteItemDefinitionGroups();
|
2014-08-15 01:52:53 +04:00
|
|
|
void VerifyNecessaryFiles();
|
|
|
|
void WriteMissingFiles();
|
|
|
|
void WriteMissingFilesWP80();
|
|
|
|
void WriteMissingFilesWP81();
|
|
|
|
void WriteMissingFilesWS80();
|
|
|
|
void WriteMissingFilesWS81();
|
2015-10-02 21:34:55 +03:00
|
|
|
void WriteMissingFilesWS10_0();
|
|
|
|
void WritePlatformExtensions();
|
|
|
|
void WriteSinglePlatformExtension(std::string const& extension,
|
|
|
|
std::string const& version);
|
|
|
|
void WriteSDKReferences();
|
|
|
|
void WriteSingleSDKReference(std::string const& extension,
|
|
|
|
std::string const& version);
|
2014-08-15 01:52:53 +04:00
|
|
|
void WriteCommonMissingFiles(const std::string& manifestFile);
|
|
|
|
void WriteTargetSpecificReferences();
|
2013-04-29 18:48:22 +04:00
|
|
|
|
2010-09-30 16:48:38 +04:00
|
|
|
bool ComputeClOptions();
|
|
|
|
bool ComputeClOptions(std::string const& configName);
|
2009-06-26 00:41:57 +04:00
|
|
|
void WriteClOptions(std::string const& config,
|
2016-05-16 17:34:04 +03:00
|
|
|
std::vector<std::string> const& includes);
|
2014-07-10 03:01:18 +04:00
|
|
|
bool ComputeRcOptions();
|
|
|
|
bool ComputeRcOptions(std::string const& config);
|
2009-06-26 00:41:57 +04:00
|
|
|
void WriteRCOptions(std::string const& config,
|
2016-05-16 17:34:04 +03:00
|
|
|
std::vector<std::string> const& includes);
|
2014-08-13 19:20:20 +04:00
|
|
|
bool ComputeMasmOptions();
|
|
|
|
bool ComputeMasmOptions(std::string const& config);
|
|
|
|
void WriteMasmOptions(std::string const& config,
|
|
|
|
std::vector<std::string> const& includes);
|
2012-10-26 18:16:45 +04:00
|
|
|
bool ComputeLinkOptions();
|
|
|
|
bool ComputeLinkOptions(std::string const& config);
|
2009-06-26 00:41:57 +04:00
|
|
|
void WriteLinkOptions(std::string const& config);
|
|
|
|
void WriteMidlOptions(std::string const& config,
|
2016-05-16 17:34:04 +03:00
|
|
|
std::vector<std::string> const& includes);
|
2014-09-02 22:33:17 +04:00
|
|
|
void WriteAntBuildOptions(std::string const& config);
|
2009-06-26 00:41:57 +04:00
|
|
|
void OutputLinkIncremental(std::string const& configName);
|
2014-03-13 02:50:42 +04:00
|
|
|
void WriteCustomRule(cmSourceFile const* source,
|
2016-05-16 17:34:04 +03:00
|
|
|
cmCustomCommand const& command);
|
2009-06-26 00:41:57 +04:00
|
|
|
void WriteCustomCommands();
|
2014-03-13 02:50:42 +04:00
|
|
|
void WriteCustomCommand(cmSourceFile const* sf);
|
2009-06-26 00:41:57 +04:00
|
|
|
void WriteGroups();
|
|
|
|
void WriteProjectReferences();
|
2014-07-31 21:22:35 +04:00
|
|
|
void WriteApplicationTypeSettings();
|
2014-03-13 02:50:42 +04:00
|
|
|
bool OutputSourceSpecificFlags(cmSourceFile const* source);
|
2014-07-23 19:13:13 +04:00
|
|
|
void AddLibraries(cmComputeLinkInformation& cli,
|
|
|
|
std::vector<std::string>& libVec);
|
2009-06-28 17:46:25 +04:00
|
|
|
void WriteLibOptions(std::string const& config);
|
2015-09-16 17:24:16 +03:00
|
|
|
void WriteManifestOptions(std::string const& config);
|
2009-07-10 17:12:39 +04:00
|
|
|
void WriteEvents(std::string const& configName);
|
2013-11-19 14:05:47 +04:00
|
|
|
void WriteEvent(const char* name,
|
|
|
|
std::vector<cmCustomCommand> const& commands,
|
2009-07-10 17:12:39 +04:00
|
|
|
std::string const& configName);
|
2012-04-27 17:21:08 +04:00
|
|
|
void WriteGroupSources(const char* name, ToolSources const& sources,
|
2016-05-16 17:34:04 +03:00
|
|
|
std::vector<cmSourceGroup>&);
|
2010-06-11 23:33:38 +04:00
|
|
|
void AddMissingSourceGroups(std::set<cmSourceGroup*>& groupsUsed,
|
|
|
|
const std::vector<cmSourceGroup>& allGroups);
|
2013-04-29 18:48:22 +04:00
|
|
|
bool IsResxHeader(const std::string& headerFile);
|
2015-03-31 23:49:39 +03:00
|
|
|
bool IsXamlHeader(const std::string& headerFile);
|
|
|
|
bool IsXamlSource(const std::string& headerFile);
|
2010-06-11 23:33:38 +04:00
|
|
|
|
2014-06-03 21:34:21 +04:00
|
|
|
cmIDEFlagTable const* GetClFlagTable() const;
|
2014-07-10 03:01:18 +04:00
|
|
|
cmIDEFlagTable const* GetRcFlagTable() const;
|
2014-06-03 21:34:21 +04:00
|
|
|
cmIDEFlagTable const* GetLibFlagTable() const;
|
|
|
|
cmIDEFlagTable const* GetLinkFlagTable() const;
|
2014-08-13 19:20:20 +04:00
|
|
|
cmIDEFlagTable const* GetMasmFlagTable() const;
|
2014-06-03 21:34:21 +04:00
|
|
|
|
2015-09-28 16:33:10 +03:00
|
|
|
bool ForceOld(const std::string& source) const;
|
|
|
|
|
2009-06-26 00:41:57 +04:00
|
|
|
private:
|
2009-10-23 19:34:37 +04:00
|
|
|
typedef cmVisualStudioGeneratorOptions Options;
|
2014-02-10 09:21:34 +04:00
|
|
|
typedef std::map<std::string, Options*> OptionsMap;
|
2009-10-23 19:34:37 +04:00
|
|
|
OptionsMap ClOptions;
|
2014-07-10 03:01:18 +04:00
|
|
|
OptionsMap RcOptions;
|
2014-08-13 19:20:20 +04:00
|
|
|
OptionsMap MasmOptions;
|
2012-10-26 18:16:45 +04:00
|
|
|
OptionsMap LinkOptions;
|
2009-07-10 17:12:39 +04:00
|
|
|
std::string PathToVcxproj;
|
2015-05-20 20:55:21 +03:00
|
|
|
std::vector<std::string> Configurations;
|
2012-03-07 20:56:21 +04:00
|
|
|
cmGeneratorTarget* GeneratorTarget;
|
2009-06-26 00:41:57 +04:00
|
|
|
cmMakefile* Makefile;
|
|
|
|
std::string Platform;
|
|
|
|
std::string GUID;
|
2009-07-14 00:58:24 +04:00
|
|
|
std::string Name;
|
2014-06-10 18:13:00 +04:00
|
|
|
bool MSTools;
|
2014-06-10 19:33:19 +04:00
|
|
|
bool NsightTegra;
|
2016-05-16 17:34:04 +03:00
|
|
|
int NsightTegraVersion[4];
|
2014-08-22 17:27:00 +04:00
|
|
|
bool TargetCompileAsWinRT;
|
2009-10-22 16:24:11 +04:00
|
|
|
cmGlobalVisualStudio10Generator* GlobalGenerator;
|
2009-06-26 00:41:57 +04:00
|
|
|
cmGeneratedFileStream* BuildFileStream;
|
|
|
|
cmLocalVisualStudio7Generator* LocalGenerator;
|
2014-03-13 02:50:42 +04:00
|
|
|
std::set<cmSourceFile const*> SourcesVisited;
|
2014-08-15 01:52:53 +04:00
|
|
|
bool IsMissingFiles;
|
|
|
|
std::vector<std::string> AddedFiles;
|
|
|
|
std::string DefaultArtifactDir;
|
2012-04-27 17:21:08 +04:00
|
|
|
|
2014-02-10 09:21:34 +04:00
|
|
|
typedef std::map<std::string, ToolSources> ToolSourceMap;
|
2012-04-27 17:21:08 +04:00
|
|
|
ToolSourceMap Tools;
|
2009-06-26 00:41:57 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|