cmCallVisualStudioMacro.h 1.6 KB

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