Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
221f8aa7
Commit
221f8aa7
authored
Jun 22, 2018
by
Brad King
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'file-GLOB-remove-new-errors' into release-3.12
Merge-request:
!2164
parents
5dc9f440
142a6257
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
28 deletions
+12
-28
Source/cmFileCommand.cxx
Source/cmFileCommand.cxx
+11
-17
Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-result.txt
Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-result.txt
+0
-1
Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-stderr.txt
Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-stderr.txt
+0
-4
Tests/RunCMake/file/GLOB-noexp-FOLLOW_SYMLINKS.cmake
Tests/RunCMake/file/GLOB-noexp-FOLLOW_SYMLINKS.cmake
+0
-0
Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-result.txt
Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-result.txt
+0
-1
Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-stderr.txt
Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-stderr.txt
+0
-4
Tests/RunCMake/file/RunCMakeTest.cmake
Tests/RunCMake/file/RunCMakeTest.cmake
+1
-1
No files found.
Source/cmFileCommand.cxx
View file @
221f8aa7
...
...
@@ -777,7 +777,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
this
->
Makefile
->
GetCMakeInstance
()
->
GetWorkingMode
();
while
(
i
!=
args
.
end
())
{
if
(
*
i
==
"LIST_DIRECTORIES"
)
{
++
i
;
++
i
;
// skip LIST_DIRECTORIES
if
(
i
!=
args
.
end
())
{
if
(
cmSystemTools
::
IsOn
(
i
->
c_str
()))
{
g
.
SetListDirs
(
true
);
...
...
@@ -789,27 +789,21 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
this
->
SetError
(
"LIST_DIRECTORIES missing bool value."
);
return
false
;
}
++
i
;
}
else
{
this
->
SetError
(
"LIST_DIRECTORIES missing bool value."
);
return
false
;
}
++
i
;
if
(
i
==
args
.
end
())
{
this
->
SetError
(
"GLOB requires a glob expression after the bool."
);
return
false
;
}
}
else
if
(
*
i
==
"FOLLOW_SYMLINKS"
)
{
if
(
!
recurse
)
{
this
->
SetError
(
"FOLLOW_SYMLINKS is not a valid parameter for GLOB."
);
return
false
;
}
explicitFollowSymlinks
=
true
;
g
.
RecurseThroughSymlinksOn
();
++
i
;
if
(
i
==
args
.
end
())
{
this
->
SetError
(
"GLOB_RECURSE requires a glob expression after FOLLOW_SYMLINKS."
);
return
false
;
++
i
;
// skip FOLLOW_SYMLINKS
if
(
recurse
)
{
explicitFollowSymlinks
=
true
;
g
.
RecurseThroughSymlinksOn
();
if
(
i
==
args
.
end
())
{
this
->
SetError
(
"GLOB_RECURSE requires a glob expression after FOLLOW_SYMLINKS."
);
return
false
;
}
}
}
else
if
(
*
i
==
"RELATIVE"
)
{
++
i
;
// skip RELATIVE
...
...
Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-result.txt
deleted
100644 → 0
View file @
5dc9f440
1
Tests/RunCMake/file/GLOB-error-FOLLOW_SYMLINKS-stderr.txt
deleted
100644 → 0
View file @
5dc9f440
^CMake Error at GLOB-error-FOLLOW_SYMLINKS\.cmake:[0-9]+ \(file\):
file FOLLOW_SYMLINKS is not a valid parameter for GLOB\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)$
Tests/RunCMake/file/GLOB-
error
-FOLLOW_SYMLINKS.cmake
→
Tests/RunCMake/file/GLOB-
noexp
-FOLLOW_SYMLINKS.cmake
View file @
221f8aa7
File moved
Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-result.txt
deleted
100644 → 0
View file @
5dc9f440
1
Tests/RunCMake/file/GLOB-noexp-LIST_DIRECTORIES-stderr.txt
deleted
100644 → 0
View file @
5dc9f440
^CMake Error at GLOB-noexp-LIST_DIRECTORIES\.cmake:[0-9]+ \(file\):
file GLOB requires a glob expression after the bool\.
Call Stack \(most recent call first\):
CMakeLists\.txt:[0-9]+ \(include\)$
Tests/RunCMake/file/RunCMakeTest.cmake
View file @
221f8aa7
...
...
@@ -39,12 +39,12 @@ run_cmake(GLOB_RECURSE-noexp-FOLLOW_SYMLINKS)
# tests are valid both for GLOB and GLOB_RECURSE
run_cmake
(
GLOB-sort-dedup
)
run_cmake
(
GLOB-error-FOLLOW_SYMLINKS
)
run_cmake
(
GLOB-error-LIST_DIRECTORIES-not-boolean
)
run_cmake
(
GLOB-error-LIST_DIRECTORIES-no-arg
)
run_cmake
(
GLOB-error-RELATIVE-no-arg
)
run_cmake
(
GLOB-error-CONFIGURE_DEPENDS-modified
)
run_cmake
(
GLOB-noexp-CONFIGURE_DEPENDS
)
run_cmake
(
GLOB-noexp-FOLLOW_SYMLINKS
)
run_cmake
(
GLOB-noexp-LIST_DIRECTORIES
)
run_cmake
(
GLOB-noexp-RELATIVE
)
run_cmake_command
(
GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE
${
CMAKE_COMMAND
}
-P
...
...
Write
Preview
Markdown
is supported
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