mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 07:11:52 +08:00
VS: Factor out Visual Studio Version
enumeration
This commit is contained in:
@@ -975,6 +975,7 @@ if(WIN32)
|
||||
cmVisualStudioWCEPlatformParser.cxx
|
||||
cmVSSetupHelper.cxx
|
||||
cmVSSetupHelper.h
|
||||
cmVSVersion.h
|
||||
)
|
||||
|
||||
# Add a manifest file to executables on Windows to allow for
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmTargetDepend.h"
|
||||
#include "cmVSVersion.h"
|
||||
#include "cmValue.h"
|
||||
|
||||
class cmCustomCommand;
|
||||
@@ -31,15 +32,7 @@ class cmake;
|
||||
class cmGlobalVisualStudioGenerator : public cmGlobalGenerator
|
||||
{
|
||||
public:
|
||||
/** Known versions of Visual Studio. */
|
||||
enum class VSVersion : uint16_t
|
||||
{
|
||||
VS14 = 140,
|
||||
VS15 = 150,
|
||||
VS16 = 160,
|
||||
VS17 = 170,
|
||||
VS18 = 180,
|
||||
};
|
||||
using VSVersion = cm::VS::Version;
|
||||
|
||||
~cmGlobalVisualStudioGenerator() override;
|
||||
|
||||
|
19
Source/cmVSVersion.h
Normal file
19
Source/cmVSVersion.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file LICENSE.rst or https://cmake.org/licensing for details. */
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace cm {
|
||||
namespace VS {
|
||||
/** Known versions of Visual Studio. */
|
||||
enum class Version : std::uint16_t
|
||||
{
|
||||
VS14 = 140,
|
||||
VS15 = 150,
|
||||
VS16 = 160,
|
||||
VS17 = 170,
|
||||
VS18 = 180,
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user