From 571bedec2970df42b9f3666e17728a7511d32b47 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 26 Apr 2016 08:22:27 -0400 Subject: VS: Ignore USE_FOLDER property on VS versions that do not support it Solution folders are supported on VS 8 and above in the full versions and on VS 11 and above in the express versions. --- Source/cmGlobalVisualStudio10Generator.cxx | 6 ------ Source/cmGlobalVisualStudio10Generator.h | 2 -- Source/cmGlobalVisualStudio11Generator.cxx | 8 ++++---- Source/cmGlobalVisualStudio71Generator.h | 3 +++ Source/cmGlobalVisualStudio8Generator.cxx | 6 ++++++ Source/cmGlobalVisualStudio8Generator.h | 2 ++ Source/cmGlobalVisualStudioGenerator.cxx | 2 +- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index c49008d..c24e7f5 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -609,12 +609,6 @@ void cmGlobalVisualStudio10Generator::PathTooLong( } //---------------------------------------------------------------------------- -bool cmGlobalVisualStudio10Generator::UseFolderProperty() -{ - return IsExpressEdition() ? false : cmGlobalGenerator::UseFolderProperty(); -} - -//---------------------------------------------------------------------------- bool cmGlobalVisualStudio10Generator::IsNsightTegra() const { return !this->NsightTegraVersion.empty(); diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index d4be329..8723fd1 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -127,8 +127,6 @@ protected: bool SystemIsWindowsPhone; bool SystemIsWindowsStore; - bool UseFolderProperty(); - private: class Factory; struct LongestSourcePath diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 9522f6e..9b00357 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -239,10 +239,10 @@ void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout) //---------------------------------------------------------------------------- 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(); + // Intentionally skip up to the top-level class implementation. + // Folders are not supported by the Express editions in VS10 and earlier, + // but they are in VS11 Express and above. + return cmGlobalGenerator::UseFolderProperty(); } //---------------------------------------------------------------------------- diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h index 5035fda..d20ffbc 100644 --- a/Source/cmGlobalVisualStudio71Generator.h +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -75,6 +75,9 @@ protected: const std::set& depends); virtual void WriteSLNHeader(std::ostream& fout); + // Folders are not supported by VS 7.1. + virtual bool UseFolderProperty() { return false; } + std::string ProjectConfigurationSectionName; }; #endif diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 7e880fe..5c50530 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -194,6 +194,12 @@ void cmGlobalVisualStudio8Generator::Configure() } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio8Generator::UseFolderProperty() +{ + return IsExpressEdition() ? false : cmGlobalGenerator::UseFolderProperty(); +} + +//---------------------------------------------------------------------------- std::string cmGlobalVisualStudio8Generator::GetUserMacrosDirectory() { // Some VS8 sp0 versions cannot run macros. diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h index 93803c3..6eb8450 100644 --- a/Source/cmGlobalVisualStudio8Generator.h +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -97,6 +97,8 @@ protected: const char* path, const cmGeneratorTarget *t); + bool UseFolderProperty(); + std::string Name; std::string WindowsCEVersion; bool ExpressEdition; diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index 04146fb..9817b09 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -92,7 +92,7 @@ void cmGlobalVisualStudioGenerator::AddExtraIDETargets() // // Organize in the "predefined targets" folder: // - if (this->UseFolderProperty() && this->GetVersion() > VS71) + if (this->UseFolderProperty()) { allBuild->SetProperty("FOLDER", this->GetPredefinedTargetsFolder()); } -- cgit v0.12