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. */
|
2006-07-11 19:41:38 +04:00
|
|
|
#ifndef cmLocalVisualStudioGenerator_h
|
|
|
|
#define cmLocalVisualStudioGenerator_h
|
|
|
|
|
|
|
|
#include "cmLocalGenerator.h"
|
2016-04-29 16:40:20 +03:00
|
|
|
|
2015-05-17 12:33:09 +03:00
|
|
|
#include "cmGlobalVisualStudioGenerator.h"
|
2006-07-11 19:41:38 +04:00
|
|
|
|
2016-06-28 17:17:52 +03:00
|
|
|
#include <cm_auto_ptr.hxx>
|
2009-06-16 19:44:07 +04:00
|
|
|
|
2006-07-11 19:41:38 +04:00
|
|
|
class cmSourceFile;
|
|
|
|
class cmSourceGroup;
|
2010-12-07 21:44:54 +03:00
|
|
|
class cmCustomCommand;
|
2014-03-10 23:47:19 +04:00
|
|
|
class cmCustomCommandGenerator;
|
2006-07-11 19:41:38 +04: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-08-02 12:41:51 +03:00
|
|
|
cmLocalVisualStudioGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
|
2006-07-11 19:41:38 +04:00
|
|
|
virtual ~cmLocalVisualStudioGenerator();
|
2010-12-17 19:11:55 +03:00
|
|
|
|
2006-09-21 23:14:06 +04:00
|
|
|
/** Construct a script from the given list of command lines. */
|
2014-03-10 23:47:19 +04:00
|
|
|
std::string ConstructScript(cmCustomCommandGenerator const& ccg,
|
2014-02-22 04:05:55 +04:00
|
|
|
const std::string& newline = "\n");
|
2006-09-21 23:14:06 +04:00
|
|
|
|
2011-04-08 18:40:57 +04:00
|
|
|
/** Label to which to jump in a batch file after a failed step in a
|
|
|
|
sequence of custom commands. */
|
|
|
|
const char* GetReportErrorLabel() const;
|
2010-12-17 19:11:55 +03:00
|
|
|
|
2015-05-17 12:33:09 +03:00
|
|
|
cmGlobalVisualStudioGenerator::VSVersion GetVersion() const;
|
2011-11-11 02:17:41 +04:00
|
|
|
|
2016-05-16 17:34:04 +03:00
|
|
|
virtual std::string ComputeLongestObjectDirectory(
|
|
|
|
cmGeneratorTarget const*) const = 0;
|
2012-03-07 23:04:33 +04:00
|
|
|
|
2012-03-28 21:49:01 +04:00
|
|
|
virtual void AddCMakeListsRules() = 0;
|
|
|
|
|
2014-03-11 20:37:26 +04:00
|
|
|
virtual void ComputeObjectFilenames(
|
2016-05-16 17:34:04 +03:00
|
|
|
std::map<cmSourceFile const*, std::string>& mapping,
|
|
|
|
cmGeneratorTarget const* = 0);
|
2014-03-11 20:37:26 +04:00
|
|
|
|
2009-06-26 00:41:57 +04:00
|
|
|
protected:
|
2011-04-08 18:40:57 +04:00
|
|
|
virtual const char* ReportErrorLabel() const;
|
2011-04-11 18:07:40 +04:00
|
|
|
virtual bool CustomCommandUseLocal() const { return false; }
|
2009-06-26 00:41:57 +04:00
|
|
|
|
|
|
|
/** Construct a custom command to make exe import lib dir. */
|
2016-06-28 17:17:52 +03:00
|
|
|
CM_AUTO_PTR<cmCustomCommand> MaybeCreateImplibDir(cmGeneratorTarget* target,
|
|
|
|
const std::string& config,
|
|
|
|
bool isFortran);
|
2006-07-11 19:41:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|