From 938a53f4f15de2cc9075d5c5929de0012060cf43 Mon Sep 17 00:00:00 2001 From: Sumit Bhardwaj Date: Thu, 23 Dec 2021 11:53:39 -0800 Subject: Refactor VsProjectType to its own header Move VsProject to its own header so that we can consolidate IsManaged and IsCSharp. --- Source/CMakeLists.txt | 1 + Source/cmVisualStudio10TargetGenerator.h | 7 ++----- Source/cmVsProjectType.h | 11 +++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 Source/cmVsProjectType.h diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 677fd2f..a9aec6c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -766,6 +766,7 @@ if (WIN32) cmGlobalVisualStudio9Generator.h cmVisualStudioGeneratorOptions.h cmVisualStudioGeneratorOptions.cxx + cmVsProjectType.h cmVisualStudio10TargetGenerator.h cmVisualStudio10TargetGenerator.cxx cmLocalVisualStudio10Generator.cxx diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 37b8dfd..8d2b77d 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -14,6 +14,7 @@ #include #include "cmGeneratorTarget.h" +#include "cmVsProjectType.h" class cmComputeLinkInformation; class cmCustomCommand; @@ -211,11 +212,7 @@ private: OptionsMap LinkOptions; std::string LangForClCompile; - enum class VsProjectType - { - vcxproj, - csproj - } ProjectType; + VsProjectType ProjectType; bool InSourceBuild; std::vector Configurations; std::vector TargetsFileAndConfigsVec; diff --git a/Source/cmVsProjectType.h b/Source/cmVsProjectType.h new file mode 100644 index 0000000..8899267 --- /dev/null +++ b/Source/cmVsProjectType.h @@ -0,0 +1,11 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#pragma once + +#include "cmConfigure.h" // IWYU pragma: keep + +enum class VsProjectType +{ + vcxproj, + csproj +}; -- cgit v0.12