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;
|
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:
|
|
|
|
cmLocalVisualStudioGenerator();
|
|
|
|
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. */
|
2010-12-07 21:44:54 +03:00
|
|
|
std::string ConstructScript(cmCustomCommand const& cc,
|
2007-05-09 16:25:45 +04:00
|
|
|
const char* configName,
|
2006-09-21 23:14:06 +04:00
|
|
|
const char* newline = "\n");
|
|
|
|
|
2010-12-17 19:11:55 +03:00
|
|
|
/** Line of batch file text that skips to the end after
|
|
|
|
* a failed step in a sequence of custom commands.
|
|
|
|
*/
|
|
|
|
std::string GetCheckForErrorLine();
|
|
|
|
|
2009-06-26 00:41:57 +04:00
|
|
|
protected:
|
2010-12-17 19:11:55 +03:00
|
|
|
virtual std::string CheckForErrorLine();
|
2009-06-26 00:41:57 +04:00
|
|
|
|
|
|
|
/** Construct a custom command to make exe import lib dir. */
|
|
|
|
cmsys::auto_ptr<cmCustomCommand>
|
2011-02-11 00:17:44 +03:00
|
|
|
MaybeCreateImplibDir(cmTarget& target, const char* config, bool isFortran);
|
2009-06-26 00:41:57 +04:00
|
|
|
|
2006-07-11 19:41:38 +04:00
|
|
|
// Safe object file name generation.
|
|
|
|
void ComputeObjectNameRequirements(std::vector<cmSourceGroup> const&);
|
2006-08-01 18:48:40 +04:00
|
|
|
bool SourceFileCompiles(const cmSourceFile* sf);
|
2007-08-28 01:05:43 +04:00
|
|
|
void CountObjectNames(const std::vector<cmSourceGroup>& groups,
|
|
|
|
std::map<cmStdString, int>& count);
|
|
|
|
void InsertNeedObjectNames(const std::vector<cmSourceGroup>& groups,
|
|
|
|
std::map<cmStdString, int>& count);
|
2006-07-11 19:41:38 +04:00
|
|
|
std::set<const cmSourceFile*> NeedObjectName;
|
2009-07-10 17:12:39 +04:00
|
|
|
friend class cmVisualStudio10TargetGenerator;
|
2006-07-11 19:41:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|