diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-10 13:47:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-09-10 13:47:39 (GMT) |
commit | 9488f8a7b7c4b4f180d16cde8a819a7a5216ef56 (patch) | |
tree | 1c90c2fec972d3d1589e580a55b8a04bff9e74a6 /Source/cmMakefile.cxx | |
parent | 293070c325ec4cb91668dbe75dd259b7dfb0aa7d (diff) | |
parent | f84193292cb36e26d13a3f1f56a1539f088e8827 (diff) | |
download | CMake-9488f8a7b7c4b4f180d16cde8a819a7a5216ef56.zip CMake-9488f8a7b7c4b4f180d16cde8a819a7a5216ef56.tar.gz CMake-9488f8a7b7c4b4f180d16cde8a819a7a5216ef56.tar.bz2 |
Merge topic 'enh-AddCacheEntry-accepts-new-types'
f84193292c Use new AddCacheEntry signatures
3c2e58eeb8 AddCacheEntry accept cmProp or std::string
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6495
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9e7816f..ef31d76 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1927,7 +1927,7 @@ void cmMakefile::AddCacheDefinition(const std::string& name, const char* value, nvalue += files[cc]; } - this->GetCMakeInstance()->AddCacheEntry(name, nvalue.c_str(), doc, type); + this->GetCMakeInstance()->AddCacheEntry(name, nvalue, doc, type); nvalue = *this->GetState()->GetInitializedCacheValue(name); value = nvalue.c_str(); } @@ -3561,13 +3561,13 @@ int cmMakefile::TryCompile(const std::string& srcdir, // Tell the single-configuration generator which one to use. // Add this before the user-provided CMake arguments in case // one of the arguments is -DCMAKE_BUILD_TYPE=... - cm.AddCacheEntry("CMAKE_BUILD_TYPE", config->c_str(), - "Build configuration", cmStateEnums::STRING); + cm.AddCacheEntry("CMAKE_BUILD_TYPE", config, "Build configuration", + cmStateEnums::STRING); } } cmProp recursionDepth = this->GetDefinition("CMAKE_MAXIMUM_RECURSION_DEPTH"); if (recursionDepth) { - cm.AddCacheEntry("CMAKE_MAXIMUM_RECURSION_DEPTH", recursionDepth->c_str(), + cm.AddCacheEntry("CMAKE_MAXIMUM_RECURSION_DEPTH", recursionDepth, "Maximum recursion depth", cmStateEnums::STRING); } // if cmake args were provided then pass them in |