From 7fa0f4b8703e08e958336b66f1b4f7db94ef4001 Mon Sep 17 00:00:00 2001 From: David Cole Date: Mon, 3 Dec 2012 13:53:43 -0500 Subject: VS11: Allow using folders with the VS11 Express Edition (#13770) Solution folders are supported as read-only in the VS11 Express Edition, so do not prohibit their use just because we detect the express edition (as we did in the VS10 generator). Inspired-by: Paris --- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalVisualStudio11Generator.cxx | 9 +++++++++ Source/cmGlobalVisualStudio11Generator.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 154e629..0f439e9 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2047,7 +2047,7 @@ bool cmGlobalGenerator::UseFolderProperty() } // By default, this feature is OFF, since it is not supported in the - // Visual Studio Express editions: + // Visual Studio Express editions until VS11: // return false; } diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index ba30e18..b6d7d04 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -93,3 +93,12 @@ cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator() lg->SetGlobalGenerator(this); return lg; } + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio11Generator::UseFolderProperty() +{ + // Intentionally skip over the parent class implementation and call the + // grand-parent class's implementation. Folders are not supported by the + // Express editions in VS10 and earlier, but they are in VS11 Express. + return cmGlobalVisualStudio8Generator::UseFolderProperty(); +} diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 8898c5d..174f1cc 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -33,6 +33,7 @@ public: virtual std::string GetUserMacrosDirectory() { return ""; } protected: virtual const char* GetIDEVersion() { return "11.0"; } + bool UseFolderProperty(); private: class Factory; }; -- cgit v0.12