2009-09-28 19:43:28 +04:00
|
|
|
/*============================================================================
|
|
|
|
CMake - Cross Platform Makefile Generator
|
|
|
|
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
|
2006-07-11 19:41:38 +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.
|
2006-07-11 19:41:38 +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.
|
|
|
|
============================================================================*/
|
2006-07-11 19:41:38 +04:00
|
|
|
#ifndef cmLocalVisualStudioGenerator_h
|
|
|
|
#define cmLocalVisualStudioGenerator_h
|
|
|
|
|
|
|
|
#include "cmLocalGenerator.h"
|
|
|
|
|
2009-06-16 19:44:07 +04:00
|
|
|
#include <cmsys/auto_ptr.hxx>
|
|
|
|
|
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:
|
2011-11-11 02:17:41 +04:00
|
|
|
/** Known versions of Visual Studio. */
|
|
|
|
enum VSVersion
|
|
|
|
{
|
|
|
|
VS6 = 60,
|
|
|
|
VS7 = 70,
|
|
|
|
VS71 = 71,
|
|
|
|
VS8 = 80,
|
|
|
|
VS9 = 90,
|
2011-11-14 18:42:51 +04:00
|
|
|
VS10 = 100,
|
2013-06-29 00:12:08 +04:00
|
|
|
VS11 = 110,
|
|
|
|
VS12 = 120
|
2011-11-11 02:17:41 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
cmLocalVisualStudioGenerator(VSVersion v);
|
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
|
|
|
|
2011-11-11 02:17:41 +04:00
|
|
|
/** Version of Visual Studio. */
|
|
|
|
VSVersion GetVersion() const { return this->Version; }
|
|
|
|
|
2012-03-07 23:04:33 +04:00
|
|
|
virtual std::string ComputeLongestObjectDirectory(cmTarget&) const = 0;
|
|
|
|
|
2012-03-28 21:49:01 +04:00
|
|
|
virtual void AddCMakeListsRules() = 0;
|
|
|
|
|
2014-03-11 20:37:26 +04:00
|
|
|
virtual void ComputeObjectFilenames(
|
|
|
|
std::map<cmSourceFile const*, std::string>& mapping,
|
|
|
|
cmGeneratorTarget const* = 0);
|
|
|
|
|
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. */
|
|
|
|
cmsys::auto_ptr<cmCustomCommand>
|
2014-02-10 07:48:34 +04:00
|
|
|
MaybeCreateImplibDir(cmTarget& target, const std::string& config,
|
|
|
|
bool isFortran);
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2011-11-11 02:17:41 +04:00
|
|
|
VSVersion Version;
|
2006-07-11 19:41:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|