From f27492a4db2c56f334b2ca5c746b01b8e9a04995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20St=C3=BCrmer?= Date: Fri, 23 Sep 2016 12:15:40 +0200 Subject: VS: Add internal API for detecting "managed" projects This is in preparation for adding CSharp language support to the VS generator. --- Source/cmVisualStudioGeneratorOptions.cxx | 5 +++++ Source/cmVisualStudioGeneratorOptions.h | 1 + 2 files changed, 6 insertions(+) diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 9badda6..4be183d 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -137,6 +137,11 @@ bool cmVisualStudioGeneratorOptions::IsWinRt() const return this->FlagMap.find("CompileAsWinRT") != this->FlagMap.end(); } +bool cmVisualStudioGeneratorOptions::IsManaged() const +{ + return this->FlagMap.find("CompileAsManaged") != this->FlagMap.end(); +} + bool cmVisualStudioGeneratorOptions::UsingUnicode() const { // Look for the a _UNICODE definition. diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index 4eeae3d..0a0b96d 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -49,6 +49,7 @@ public: bool IsDebug() const; bool IsWinRt() const; + bool IsManaged() const; // Write options to output. void OutputPreprocessorDefinitions(std::ostream& fout, const char* prefix, const char* suffix, -- cgit v0.12