summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-11-08 19:28:04 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-11-08 19:28:21 (GMT)
commit9758dbd9d4122b03bf1257524545b188f3de91f2 (patch)
tree5f16948e6938d2115c044c122031daab5c69c60b /Source
parent76af3f16367627ce1ff27f95ada8d56d05756155 (diff)
parentd3acd22380663bd4061abf07384d507c589d3286 (diff)
downloadCMake-9758dbd9d4122b03bf1257524545b188f3de91f2.zip
CMake-9758dbd9d4122b03bf1257524545b188f3de91f2.tar.gz
CMake-9758dbd9d4122b03bf1257524545b188f3de91f2.tar.bz2
Merge topic 'use_folders_on_by_default'
d3acd22380 USE_FOLDERS: Treat as on by default Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Amir Masoud Abdol <amirmasoudabdol@icloud.com> Merge-request: !7830
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx13
-rw-r--r--Source/cmPolicies.h5
2 files changed, 10 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index c2bf888..a539d33 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2943,19 +2943,18 @@ std::string cmGlobalGenerator::GetPredefinedTargetsFolder() const
bool cmGlobalGenerator::UseFolderProperty() const
{
- cmValue prop =
+ const cmValue prop =
this->GetCMakeInstance()->GetState()->GetGlobalProperty("USE_FOLDERS");
- // If this property is defined, let the setter turn this on or off...
- //
+ // If this property is defined, let the setter turn this on or off.
if (prop) {
return cmIsOn(*prop);
}
- // By default, this feature is OFF, since it is not supported in the
- // Visual Studio Express editions until VS11:
- //
- return false;
+ // If CMP0143 is NEW `treat` "USE_FOLDERS" as ON. Otherwise `treat` it as OFF
+ assert(!this->Makefiles.empty());
+ return (this->Makefiles[0]->GetPolicyStatus(cmPolicies::CMP0143) ==
+ cmPolicies::NEW);
}
void cmGlobalGenerator::CreateGlobalTarget(GlobalTargetInfo const& gti,
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 4643868..fa24f57 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -431,7 +431,10 @@ class cmMakefile;
SELECT(POLICY, CMP0142, \
"The Xcode generator does not append per-config suffixes to " \
"library search paths.", \
- 3, 25, 0, cmPolicies::WARN)
+ 3, 25, 0, cmPolicies::WARN) \
+ SELECT(POLICY, CMP0143, \
+ "Global property USE_FOLDERS treated as ON by default", 3, 26, 0, \
+ cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \