mirror of
https://github.com/reactos/CMake.git
synced 2024-12-16 08:07:29 +00:00
Merge topic 'update-kwsys'
3d1c3e0d
Merge branch 'upstream-KWSys' into update-kwsysa3275878
KWSys 2017-06-09 (a700e2ab) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !947
This commit is contained in:
commit
aa9d0afc52
@ -22,7 +22,6 @@
|
||||
#include KWSYS_HEADER(FStream.hxx)
|
||||
#include KWSYS_HEADER(Encoding.hxx)
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
@ -3709,16 +3708,6 @@ std::string SystemTools::JoinPath(
|
||||
return result;
|
||||
}
|
||||
|
||||
void SystemTools::RemoveEmptyPathElements(std::vector<std::string>& path)
|
||||
{
|
||||
if (path.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
path.erase(std::remove(path.begin() + 1, path.end(), std::string("")),
|
||||
path.end());
|
||||
}
|
||||
|
||||
bool SystemTools::ComparePath(const std::string& c1, const std::string& c2)
|
||||
{
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
|
@ -461,6 +461,10 @@ public:
|
||||
* produce the original path. Home directory references are
|
||||
* automatically expanded if expand_home_dir is true and this
|
||||
* platform supports them.
|
||||
*
|
||||
* This does *not* normalize the input path. All components are
|
||||
* preserved, including empty ones. Typically callers should use
|
||||
* this only on paths that have already been normalized.
|
||||
*/
|
||||
static void SplitPath(const std::string& p,
|
||||
std::vector<std::string>& components,
|
||||
@ -469,15 +473,15 @@ public:
|
||||
/**
|
||||
* Join components of a path name into a single string. See
|
||||
* SplitPath for the format of the components.
|
||||
*
|
||||
* This does *not* normalize the input path. All components are
|
||||
* preserved, including empty ones. Typically callers should use
|
||||
* this only on paths that have already been normalized.
|
||||
*/
|
||||
static std::string JoinPath(const std::vector<std::string>& components);
|
||||
static std::string JoinPath(std::vector<std::string>::const_iterator first,
|
||||
std::vector<std::string>::const_iterator last);
|
||||
|
||||
/** Removes empty components from path.
|
||||
*/
|
||||
static void RemoveEmptyPathElements(std::vector<std::string>& path);
|
||||
|
||||
/**
|
||||
* Compare a path or components of a path.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user