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. */
|
2008-10-12 18:41:06 +02:00
|
|
|
#ifndef cmLocalVisualStudioGenerator_h
|
|
|
|
#define cmLocalVisualStudioGenerator_h
|
|
|
|
|
2017-07-20 19:35:53 +02:00
|
|
|
#include "cmConfigure.h"
|
2016-07-09 11:21:54 +02:00
|
|
|
|
2017-04-14 19:02:05 +02:00
|
|
|
#include <map>
|
|
|
|
#include <memory>
|
|
|
|
#include <string>
|
2008-10-12 18:41:06 +02:00
|
|
|
|
2017-04-14 19:02:05 +02:00
|
|
|
#include "cmGlobalVisualStudioGenerator.h"
|
|
|
|
#include "cmLocalGenerator.h"
|
|
|
|
#include "cm_auto_ptr.hxx"
|
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;
|
2008-10-12 18:41:06 +02:00
|
|
|
|
|
|
|
/** \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);
|
2008-10-12 18:41:06 +02:00
|
|
|
virtual ~cmLocalVisualStudioGenerator();
|
2011-01-16 11:35:12 +01:00
|
|
|
|
2008-10-12 18:41:06 +02:00
|
|
|
/** Construct a script from the given list of command lines. */
|
2015-04-27 22:25:09 +02:00
|
|
|
std::string ConstructScript(cmCustomCommandGenerator const& ccg,
|
|
|
|
const std::string& newline = "\n");
|
2008-10-12 18:41:06 +02:00
|
|
|
|
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
|
|
|
|
|
|
|
virtual void AddCMakeListsRules() = 0;
|
|
|
|
|
2015-04-27 22:25:09 +02:00
|
|
|
virtual void ComputeObjectFilenames(
|
2016-07-09 11:21:54 +02:00
|
|
|
std::map<cmSourceFile const*, std::string>& mapping,
|
|
|
|
cmGeneratorTarget const* = 0);
|
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. */
|
2016-10-30 18:24:19 +01:00
|
|
|
CM_AUTO_PTR<cmCustomCommand> MaybeCreateImplibDir(cmGeneratorTarget* target,
|
|
|
|
const std::string& config,
|
|
|
|
bool isFortran);
|
2008-10-12 18:41:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|