Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
51efd901
Unverified
Commit
51efd901
authored
Nov 29, 2022
by
James Lamb
Committed by
GitHub
Nov 28, 2022
Browse files
[R-package] correctly quote paths on Windows for CMake-based builds (#5607)
parent
ed1771c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
build_r.R
build_r.R
+5
-4
No files found.
build_r.R
View file @
51efd901
...
@@ -100,17 +100,18 @@ if (length(keyword_args) > 0L) {
...
@@ -100,17 +100,18 @@ if (length(keyword_args) > 0L) {
for
(
i
in
seq_len
(
length
(
keyword_args
)))
{
for
(
i
in
seq_len
(
length
(
keyword_args
)))
{
arg_name
<-
names
(
keyword_args
)[[
i
]]
arg_name
<-
names
(
keyword_args
)[[
i
]]
define_name
<-
ARGS_TO_DEFINES
[[
arg_name
]]
define_name
<-
ARGS_TO_DEFINES
[[
arg_name
]]
arg_value
<-
shQuote
(
keyword_args
[[
arg_name
]])
arg_value
<-
shQuote
(
normalizePath
(
keyword_args
[[
arg_name
]]
,
winslash
=
"/"
)
)
cmake_args_to_add
<-
c
(
cmake_args_to_add
,
paste0
(
define_name
,
"="
,
arg_value
))
cmake_args_to_add
<-
c
(
cmake_args_to_add
,
paste0
(
define_name
,
"="
,
arg_value
))
}
}
install_libs_content
<-
gsub
(
install_libs_content
<-
gsub
(
pattern
=
paste0
(
"command_line_args <- NULL"
)
pattern
=
paste0
(
"command_line_args <- NULL"
)
,
replacement
=
paste0
(
,
replacement
=
paste0
(
"command_line_args <- c(\
"
"
"command_line_args <- c(\
'
"
,
paste
(
cmake_args_to_add
,
collapse
=
"
\", \"
"
)
,
paste
(
cmake_args_to_add
,
collapse
=
"
', '
"
)
,
"
\"
)"
,
"
'
)"
)
)
,
x
=
install_libs_content
,
x
=
install_libs_content
,
fixed
=
TRUE
)
)
}
}
...
...
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