1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmLocalVisualStudioGenerator.h,v $
6 Date: $Date: 2009-09-07 14:11:18 $
7 Version: $Revision: 1.12 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmLocalVisualStudioGenerator_h
18 #define cmLocalVisualStudioGenerator_h
20 #include "cmLocalGenerator.h"
22 #include <cmsys/auto_ptr.hxx>
27 /** \class cmLocalVisualStudioGenerator
28 * \brief Base class for Visual Studio generators.
30 * cmLocalVisualStudioGenerator provides functionality common to all
31 * Visual Studio generators.
33 class cmLocalVisualStudioGenerator
: public cmLocalGenerator
36 cmLocalVisualStudioGenerator();
37 virtual ~cmLocalVisualStudioGenerator();
38 /** Construct a script from the given list of command lines. */
39 std::string
ConstructScript(const cmCustomCommandLines
& commandLines
,
40 const char* workingDirectory
,
41 const char* configName
,
43 bool escapeAllowMakeVars
,
44 const char* newline
= "\n");
48 /** Construct a custom command to make exe import lib dir. */
49 cmsys::auto_ptr
<cmCustomCommand
>
50 MaybeCreateImplibDir(cmTarget
& target
, const char* config
);
52 // Safe object file name generation.
53 void ComputeObjectNameRequirements(std::vector
<cmSourceGroup
> const&);
54 bool SourceFileCompiles(const cmSourceFile
* sf
);
55 void CountObjectNames(const std::vector
<cmSourceGroup
>& groups
,
56 std::map
<cmStdString
, int>& count
);
57 void InsertNeedObjectNames(const std::vector
<cmSourceGroup
>& groups
,
58 std::map
<cmStdString
, int>& count
);
59 std::set
<const cmSourceFile
*> NeedObjectName
;
60 friend class cmVisualStudio10TargetGenerator
;