summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-31 13:34:46 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-05-31 13:35:25 (GMT)
commitc4f273e722f76a62183265200a3dd18a50b1a60a (patch)
treef97b761f77deaf149d0302c84533e85d07de19ce /Source/cmGlobalGenerator.cxx
parent826825fe34df12e7e9b5d46a9df0011b0c70b1ba (diff)
parent4fc322bab421a83b12977aadc7dca247db8ae541 (diff)
downloadCMake-c4f273e722f76a62183265200a3dd18a50b1a60a.zip
CMake-c4f273e722f76a62183265200a3dd18a50b1a60a.tar.gz
CMake-c4f273e722f76a62183265200a3dd18a50b1a60a.tar.bz2
Merge topic 'AddCacheEntry-suppress-raw-pointer-usage'
4fc322bab4 AddCacheEntry: Suppress raw pointer usage Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8520
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7e6b16a..f50c4cb 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1375,11 +1375,9 @@ void cmGlobalGenerator::Configure()
// update the cache entry for the number of local generators, this is used
// for progress
- char num[100];
- snprintf(num, sizeof(num), "%d", static_cast<int>(this->Makefiles.size()));
- this->GetCMakeInstance()->AddCacheEntry("CMAKE_NUMBER_OF_MAKEFILES", num,
- "number of local generators",
- cmStateEnums::INTERNAL);
+ this->GetCMakeInstance()->AddCacheEntry(
+ "CMAKE_NUMBER_OF_MAKEFILES", std::to_string(this->Makefiles.size()),
+ "number of local generators", cmStateEnums::INTERNAL);
auto endTime = std::chrono::steady_clock::now();