1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmCallVisualStudioMacro_h
13 #define cmCallVisualStudioMacro_h
15 #include "cmStandardIncludes.h"
17 /** \class cmCallVisualStudioMacro
18 * \brief Control class for communicating with CMake's Visual Studio macros
20 * Find running instances of Visual Studio by full path solution name.
21 * Call a Visual Studio IDE macro in any of those instances.
23 class cmCallVisualStudioMacro
26 ///! Call the named macro in instances of Visual Studio with the
27 ///! given solution file open. Pass "ALL" for slnFile to call the
28 ///! macro in each Visual Studio instance.
29 static int CallMacro(const std::string& slnFile,
30 const std::string& macro,
31 const std::string& args,
32 const bool logErrorsAsMessages);
34 ///! Count the number of running instances of Visual Studio with the
35 ///! given solution file open. Pass "ALL" for slnFile to count all
36 ///! running Visual Studio instances.
37 static int GetNumberOfRunningVisualStudioInstances(
38 const std::string& slnFile);