cmake/Source/cmLocalVisualStudioGenerator.h

76 lines
2.2 KiB
C
Raw Normal View History

2009-10-04 10:30:41 +03:00
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
2009-10-04 10:30:41 +03:00
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
2009-10-04 10:30:41 +03: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.
============================================================================*/
#ifndef cmLocalVisualStudioGenerator_h
#define cmLocalVisualStudioGenerator_h
#include "cmLocalGenerator.h"
2009-10-04 10:30:41 +03:00
#include <cmsys/auto_ptr.hxx>
class cmSourceFile;
class cmSourceGroup;
2011-01-16 11:35:12 +01:00
class cmCustomCommand;
/** \class cmLocalVisualStudioGenerator
* \brief Base class for Visual Studio generators.
*
* cmLocalVisualStudioGenerator provides functionality common to all
* Visual Studio generators.
*/
class cmLocalVisualStudioGenerator : public cmLocalGenerator
{
public:
2012-02-18 12:40:36 +02:00
/** Known versions of Visual Studio. */
enum VSVersion
{
VS6 = 60,
VS7 = 70,
VS71 = 71,
VS8 = 80,
VS9 = 90,
VS10 = 100,
2013-07-04 23:25:18 +03:00
VS11 = 110,
VS12 = 120
2012-02-18 12:40:36 +02:00
};
cmLocalVisualStudioGenerator(VSVersion v);
virtual ~cmLocalVisualStudioGenerator();
2011-01-16 11:35:12 +01:00
/** Construct a script from the given list of command lines. */
2011-01-16 11:35:12 +01:00
std::string ConstructScript(cmCustomCommand const& cc,
const char* configName,
const char* 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
2012-02-18 12:40:36 +02:00
/** Version of Visual Studio. */
VSVersion GetVersion() const { return this->Version; }
2012-04-19 19:04:21 +03:00
virtual std::string ComputeLongestObjectDirectory(cmTarget&) const = 0;
virtual void AddCMakeListsRules() = 0;
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. */
cmsys::auto_ptr<cmCustomCommand>
2011-06-19 15:41:06 +03:00
MaybeCreateImplibDir(cmTarget& target, const char* config, bool isFortran);
2009-10-04 10:30:41 +03:00
2012-02-18 12:40:36 +02:00
VSVersion Version;
};
#endif