1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

Merge topic 'cmPropertySentinel-definition'

319c427d2f cmPropertySentinel: update definition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11129
This commit is contained in:
Brad King
2025-09-02 13:47:50 +00:00
committed by Kitware Robot
4 changed files with 10 additions and 6 deletions

View File

@@ -27,6 +27,10 @@
#include "cmSystemTools.h"
#include "cmake.h"
namespace cmStateDetail {
std::string const PropertySentinel = std::string{};
} // namespace cmStateDetail
cmState::cmState(Mode mode, ProjectKind projectKind)
: StateMode(mode)
, StateProjectKind(projectKind)

View File

@@ -66,7 +66,7 @@ cmBTStringRange GetPropertyContent(T const& content, U contentEndPosition)
auto end = content.begin() + contentEndPosition;
auto rbegin = cm::make_reverse_iterator(end);
rbegin = std::find(rbegin, content.rend(), cmPropertySentinel);
rbegin = std::find(rbegin, content.rend(), cmStateDetail::PropertySentinel);
return cmMakeRange(rbegin.base(), end);
}
@@ -130,7 +130,7 @@ void cmStateDirectory::PrependIncludeDirectoriesEntry(
auto rend = this->DirectoryState->IncludeDirectories.rend();
auto rbegin = cm::make_reverse_iterator(entryEnd);
rbegin = std::find(rbegin, rend, cmPropertySentinel);
rbegin = std::find(rbegin, rend, cmStateDetail::PropertySentinel);
auto entryIt = rbegin.base();
@@ -244,7 +244,7 @@ void cmStateDirectory::PrependLinkDirectoriesEntry(const BT<std::string>& vec)
auto rend = this->DirectoryState->LinkDirectories.rend();
auto rbegin = cm::make_reverse_iterator(entryEnd);
rbegin = std::find(rbegin, rend, cmPropertySentinel);
rbegin = std::find(rbegin, rend, cmStateDetail::PropertySentinel);
auto entryIt = rbegin.base();

View File

@@ -22,10 +22,9 @@
namespace cmStateDetail {
struct BuildsystemDirectoryStateType;
struct PolicyStackEntry;
extern std::string const PropertySentinel;
} // namespace cmStateDetail
static std::string const cmPropertySentinel = std::string();
struct cmStateDetail::SnapshotDataType
{
cmStateDetail::PositionType ScopeParent;

View File

@@ -290,7 +290,8 @@ void InitializeContentFromParent(T& parentContent, T& thisContent,
auto parentRbegin = cm::make_reverse_iterator(parentEnd);
auto parentRend = parentContent.rend();
parentRbegin = std::find(parentRbegin, parentRend, cmPropertySentinel);
parentRbegin =
std::find(parentRbegin, parentRend, cmStateDetail::PropertySentinel);
auto parentIt = parentRbegin.base();
thisContent = std::vector<BT<std::string>>(parentIt, parentEnd);