STYLE: Fix line-too-long
[cmake.git] / Source / cmGlobalVisualStudioGenerator.h
blob7c811db64bf026ebd5e13975b14dc180660747ae
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGlobalVisualStudioGenerator.h,v $
5 Language: C++
6 Date: $Date: 2008-04-30 17:26:03 $
7 Version: $Revision: 1.8 $
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 cmGlobalVisualStudioGenerator_h
18 #define cmGlobalVisualStudioGenerator_h
20 #include "cmGlobalGenerator.h"
22 /** \class cmGlobalVisualStudioGenerator
23 * \brief Base class for global Visual Studio generators.
25 * cmGlobalVisualStudioGenerator provides functionality common to all
26 * global Visual Studio generators.
28 class cmGlobalVisualStudioGenerator : public cmGlobalGenerator
30 public:
31 cmGlobalVisualStudioGenerator();
32 virtual ~cmGlobalVisualStudioGenerator();
34 /**
35 * Basic generate implementation for all VS generators.
37 virtual void Generate();
39 /**
40 * Configure CMake's Visual Studio macros file into the user's Visual
41 * Studio macros directory.
43 virtual void ConfigureCMakeVisualStudioMacros();
45 /**
46 * Where does this version of Visual Studio look for macros for the
47 * current user? Returns the empty string if this version of Visual
48 * Studio does not implement support for VB macros.
50 virtual std::string GetUserMacrosDirectory();
52 /**
53 * What is the reg key path to "vsmacros" for this version of Visual
54 * Studio?
56 virtual std::string GetUserMacrosRegKeyBase();
58 enum MacroName {MacroReload, MacroStop};
60 /**
61 * Call the ReloadProjects macro if necessary based on
62 * GetFilesReplacedDuringGenerate results.
64 virtual void CallVisualStudioMacro(MacroName m,
65 const char* vsSolutionFile = 0);
67 // return true if target is fortran only
68 bool TargetIsFortranOnly(cmTarget& t);
70 protected:
71 virtual void CreateGUID(const char*) {}
72 void FixUtilityDepends();
73 const char* GetUtilityForTarget(cmTarget& target, const char*);
75 // Does this VS version link targets to each other if there are
76 // dependencies in the SLN file? This was done for VS versions
77 // below 8.
78 virtual bool VSLinksDependencies() const { return true; }
80 private:
81 void FixUtilityDependsForTarget(cmTarget& target);
82 void CreateUtilityDependTarget(cmTarget& target);
83 bool CheckTargetLinks(cmTarget& target, const char* name);
86 #endif