mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 11:10:06 -05:00
Merge topic 'fix-legacy-implicit-includes'
6fc3382944Update logic for sysroot in detected implicit include directories2ad14ef4eacmAlgorithms: Add cmHasPrefix to match existing cmHasSuffix557b2d6e65Fix regression in -I/usr/include exclusion logic017598a444macOS: Fix addition of <sdk>/usr/include to default implicit include dirs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2957
This commit is contained in:
@@ -348,6 +348,14 @@ std::reverse_iterator<Iter> cmMakeReverseIterator(Iter it)
|
||||
return std::reverse_iterator<Iter>(it);
|
||||
}
|
||||
|
||||
inline bool cmHasPrefix(std::string const& str, std::string const& prefix)
|
||||
{
|
||||
if (str.size() < prefix.size()) {
|
||||
return false;
|
||||
}
|
||||
return str.compare(0, prefix.size(), prefix) == 0;
|
||||
}
|
||||
|
||||
inline bool cmHasSuffix(const std::string& str, const std::string& suffix)
|
||||
{
|
||||
if (str.size() < suffix.size()) {
|
||||
|
||||
Reference in New Issue
Block a user