cmake/Source/cmLocalVisualStudioGenerator.h

60 lines
1.9 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-07-09 11:21:54 +02:00
2017-04-14 19:02:05 +02:00
#include <map>
2020-02-01 23:06:01 +01:00
#include <memory>
2017-04-14 19:02:05 +02:00
#include <string>
2017-04-14 19:02:05 +02:00
#include "cmGlobalVisualStudioGenerator.h"
#include "cmLocalGenerator.h"
2022-03-29 21:10:50 +02:00
#include "cmVsProjectType.h"
2009-10-04 10:30:41 +03:00
2011-01-16 11:35:12 +01:00
class cmCustomCommand;
2015-04-27 22:25:09 +02:00
class cmCustomCommandGenerator;
2017-04-14 19:02:05 +02:00
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmMakefile;
class cmSourceFile;
/** \class cmLocalVisualStudioGenerator
* \brief Base class for Visual Studio generators.
*
* cmLocalVisualStudioGenerator provides functionality common to all
* Visual Studio generators.
*/
class cmLocalVisualStudioGenerator : public cmLocalGenerator
{
public:
2015-11-17 17:22:37 +01:00
cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
2023-05-23 16:38:00 +02:00
~cmLocalVisualStudioGenerator() override;
2011-01-16 11:35:12 +01:00
2015-04-27 22:25:09 +02:00
std::string ConstructScript(cmCustomCommandGenerator const& ccg,
const std::string& newline = "\n");
2022-03-29 21:10:50 +02:00
std::string FinishConstructScript(VsProjectType projectType,
const std::string& newline = "\n");
2011-06-19 15:41:06 +03:00
/** Label to which to jump in a batch file after a failed step in a
sequence of custom commands. */
const char* GetReportErrorLabel() const;
2011-01-16 11:35:12 +01:00
2015-08-17 11:37:30 +02:00
cmGlobalVisualStudioGenerator::VSVersion GetVersion() const;
2012-02-18 12:40:36 +02:00
2016-07-09 11:21:54 +02:00
virtual std::string ComputeLongestObjectDirectory(
cmGeneratorTarget const*) const = 0;
2012-04-19 19:04:21 +03:00
2018-04-23 21:13:27 +02:00
void ComputeObjectFilenames(
2016-07-09 11:21:54 +02:00
std::map<cmSourceFile const*, std::string>& mapping,
2023-05-23 16:38:00 +02:00
cmGeneratorTarget const* = nullptr) override;
2015-04-27 22:25:09 +02:00
2009-10-04 10:30:41 +03:00
protected:
2011-06-19 15:41:06 +03:00
virtual const char* ReportErrorLabel() const;
virtual bool CustomCommandUseLocal() const { return false; }
2009-10-04 10:30:41 +03:00
/** Construct a custom command to make exe import lib dir. */
2018-01-26 17:06:56 +01:00
std::unique_ptr<cmCustomCommand> MaybeCreateImplibDir(
cmGeneratorTarget* target, const std::string& config, bool isFortran);
};