Skip to content

Commit

Permalink
cpp11 test
Browse files Browse the repository at this point in the history
  • Loading branch information
pachadotdev committed Nov 13, 2023
1 parent a6f6167 commit dcbdde1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 73 deletions.
59 changes: 0 additions & 59 deletions .vscode/settings.json

This file was deleted.

18 changes: 4 additions & 14 deletions R/cpp11.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ use_cpp11 <- function() {

check_cpp_register_deps()

check_cpp_dynlib()
roxygen_ns_append(
sprintf("@useDynLib %s, .registration = TRUE", project_name())
)
roxygen_update_ns()

invisible()
}
Expand All @@ -42,16 +45,3 @@ check_cpp_register_deps <- function() {
ui_todo("Now install {ui_value(cpp_register_deps[!installed])} to use cpp11.")
}
}

get_cpp_dynlib <- function() {
desc <- desc::desc(package = NULL)
desc$get_list("Package")[[1]]
}

check_cpp_dynlib <- function() {
pkgname <- get_cpp_dynlib()
roxygen_ns_append(
sprintf("@useDynLib %s, .registration = TRUE", pkgname)
)
roxygen_update_ns()
}

0 comments on commit dcbdde1

Please sign in to comment.