[R-package] remove Makefile hack in install.libs.R (#3528)

This commit is contained in:
James Lamb 2020-11-06 01:47:39 +00:00 коммит произвёл GitHub
Родитель 35d6ba6f15
Коммит 3db7c1b741
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 0 добавлений и 23 удалений

Просмотреть файл

@ -216,29 +216,6 @@ if (!makefiles_already_generated) {
.run_shell_command("cmake", c(cmake_args, ".."))
}
# R CMD check complains about the .NOTPARALLEL directive created in the cmake
# Makefile. We don't need it here anyway since targets are built serially, so trying
# to remove it with this hack
generated_makefile <- file.path(
build_dir
, "Makefile"
)
if (file.exists(generated_makefile)) {
makefile_txt <- readLines(
con = generated_makefile
)
makefile_txt <- gsub(
pattern = ".*NOTPARALLEL.*"
, replacement = ""
, x = makefile_txt
)
writeLines(
text = makefile_txt
, con = generated_makefile
, sep = "\n"
)
}
# build the library
message("Building lib_lightgbm")
.run_shell_command(build_cmd, build_args)