Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
4c90e943
Commit
4c90e943
authored
Mar 29, 2018
by
Brad King
Browse files
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2018-03-29 (488f2031)
parents
894a41fc
b66f18c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/kwsys/SystemTools.cxx
View file @
4c90e943
...
...
@@ -3344,15 +3344,20 @@ std::string SystemTools::RelativePath(const std::string& local,
static
std
::
string
GetCasePathName
(
std
::
string
const
&
pathIn
)
{
std
::
string
casePath
;
std
::
vector
<
std
::
string
>
path_components
;
SystemTools
::
SplitPath
(
pathIn
,
path_components
);
if
(
path_components
[
0
].
empty
())
// First component always exists.
{
// Relative paths cannot be converted.
// First check if the file is relative. We don't fix relative paths since the
// real case depends on the root directory and the given path fragment may
// have meaning elsewhere in the project.
if
(
!
SystemTools
::
FileIsFullPath
(
pathIn
))
{
// This looks unnecessary, but it allows for the return value optimization
// since all return paths return the same local variable.
casePath
=
pathIn
;
return
casePath
;
}
std
::
vector
<
std
::
string
>
path_components
;
SystemTools
::
SplitPath
(
pathIn
,
path_components
);
// Start with root component.
std
::
vector
<
std
::
string
>::
size_type
idx
=
0
;
casePath
=
path_components
[
idx
++
];
...
...
Source/kwsys/Terminal.c
View file @
4c90e943
...
...
@@ -153,6 +153,7 @@ static const char* kwsysTerminalVT100Names[] = { "Eterm",
"xterm-88color"
,
"xterm-color"
,
"xterm-debian"
,
"xterm-kitty"
,
"xterm-termite"
,
0
};
...
...
Source/kwsys/testSystemTools.cxx
View file @
4c90e943
...
...
@@ -738,29 +738,29 @@ static bool CheckGetPath()
#endif
const
char
*
registryPath
=
"[HKEY_LOCAL_MACHINE
\\
SOFTWARE
\\
MyApp; MyKey]"
;
std
::
vector
<
std
::
string
>
originalPath
e
s
;
originalPath
e
s
.
push_back
(
registryPath
);
std
::
vector
<
std
::
string
>
originalPaths
;
originalPaths
.
push_back
(
registryPath
);
std
::
vector
<
std
::
string
>
expectedPath
e
s
;
expectedPath
e
s
.
push_back
(
registryPath
);
std
::
vector
<
std
::
string
>
expectedPaths
;
expectedPaths
.
push_back
(
registryPath
);
#ifdef _WIN32
expectedPath
e
s
.
push_back
(
"C:/Somewhere/something"
);
expectedPath
e
s
.
push_back
(
"D:/Temp"
);
expectedPaths
.
push_back
(
"C:/Somewhere/something"
);
expectedPaths
.
push_back
(
"D:/Temp"
);
#else
expectedPath
e
s
.
push_back
(
"/Somewhere/something"
);
expectedPath
e
s
.
push_back
(
"/tmp"
);
expectedPaths
.
push_back
(
"/Somewhere/something"
);
expectedPaths
.
push_back
(
"/tmp"
);
#endif
bool
res
=
true
;
res
&=
CheckPutEnv
(
std
::
string
(
envName
)
+
"="
+
envValue
,
envName
,
envValue
);
std
::
vector
<
std
::
string
>
path
e
s
=
originalPath
e
s
;
kwsys
::
SystemTools
::
GetPath
(
path
e
s
,
envName
);
std
::
vector
<
std
::
string
>
paths
=
originalPaths
;
kwsys
::
SystemTools
::
GetPath
(
paths
,
envName
);
if
(
path
e
s
!=
expectedPath
e
s
)
{
std
::
cerr
<<
"GetPath("
<<
StringVectorToString
(
originalPath
e
s
)
<<
", "
<<
envName
<<
") yielded "
<<
StringVectorToString
(
path
e
s
)
<<
" instead of "
<<
StringVectorToString
(
expectedPath
e
s
)
if
(
paths
!=
expectedPaths
)
{
std
::
cerr
<<
"GetPath("
<<
StringVectorToString
(
originalPaths
)
<<
", "
<<
envName
<<
") yielded "
<<
StringVectorToString
(
paths
)
<<
" instead of "
<<
StringVectorToString
(
expectedPaths
)
<<
std
::
endl
;
res
=
false
;
}
...
...
Brad King
@brad.king
mentioned in commit
8f5b6962
·
Apr 02, 2018
mentioned in commit
8f5b6962
mentioned in commit 8f5b6962c9f43fda7f1c771bb41fd6db92bc4045
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment