Browse Source

cmGlobalGenerator: mark intermediate directory strategy variables as used

Fixes: #27222
Ben Boeckel 1 month ago
parent
commit
9ad31a0d88
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/cmGlobalGenerator.cxx

+ 3 - 0
Source/cmGlobalGenerator.cxx

@@ -1444,6 +1444,7 @@ bool cmGlobalGenerator::Compute()
 
   if (cmValue v = this->CMakeInstance->GetCacheDefinition(
         "CMAKE_INTERMEDIATE_DIR_STRATEGY")) {
+    this->GetCMakeInstance()->MarkCliAsUsed("CMAKE_INTERMEDIATE_DIR_STRATEGY");
     if (*v == "FULL") {
       this->IntDirStrategy = IntermediateDirStrategy::Full;
     } else if (*v == "SHORT") {
@@ -1457,6 +1458,8 @@ bool cmGlobalGenerator::Compute()
   }
   if (cmValue v = this->CMakeInstance->GetCacheDefinition(
         "CMAKE_AUTOGEN_INTERMEDIATE_DIR_STRATEGY")) {
+    this->GetCMakeInstance()->MarkCliAsUsed(
+      "CMAKE_AUTOGEN_INTERMEDIATE_DIR_STRATEGY");
     if (*v == "FULL") {
       this->QtAutogenIntDirStrategy = IntermediateDirStrategy::Full;
     } else if (*v == "SHORT") {