Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RcppParallel linker flags for StanHeaders 2.26 Compatibility #5

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Suggests:
testthat (>= 3.0.0)
Imports:
Rcpp (>= 1.0.8),
checkmate
checkmate,
RcppParallel
Description: Provides the log-likelihoods with gradients from 'stan'
(Carpenter et al (2015), <arXiv:1509.07164>) needed
for generalized log-likelihood estimation in 'nlmixr2'
Expand All @@ -23,16 +24,18 @@ Description: Provides the log-likelihoods with gradients from 'stan'
the 'nlmixr2' models during estimation.
BugReports: https://github.com/nlmixr2/rxode2ll/issues/
NeedsCompilation: yes
License: GPL (>= 3)
License: GPL (>= 3)
URL: https://nlmixr2.github.io/rxode2ll/, https://github.com/nlmixr2/rxode2ll/
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
Biarch: true
LinkingTo:
Rcpp (>= 1.0.8),
RcppEigen (>= 0.3.3.9.2),
StanHeaders (>= 2.21.0.7),
BH (>= 1.78.0.0)
BH (>= 1.78.0.0),
RcppParallel
Encoding: UTF-8
Language: en-US
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
SystemRequirements: GNU make
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ export(llikT)
export(llikUnif)
export(llikWeibull)
importFrom(Rcpp,sourceCpp)
importFrom(RcppParallel,RcppParallelLibs)
useDynLib(rxode2ll, .registration=TRUE)
1 change: 1 addition & 0 deletions R/llik.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#' @author Matthew L. Fidler
#' @export
#' @importFrom Rcpp sourceCpp
#' @importFrom RcppParallel RcppParallelLibs
#' @examples
#'
#' llikNorm(0)
Expand Down
5 changes: 4 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
CXX_STD = CXX14
CXX14STD = -std=gnu++14
PKG_CXXFLAGS = -DBOOST_DISABLE_ASSERTS -DBOOST_NO_CXX11_STATIC_ASSERT -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -D_REENTRANT

PKG_CXXFLAGS += $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") \
$(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
PKG_LIBS += $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") \
$(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")
3 changes: 3 additions & 0 deletions src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
CXX_STD = CXX14
CXX14STD = -std=c++1y
PKG_CXXFLAGS = -DBOOST_DISABLE_ASSERTS -DBOOST_NO_CXX11_STATIC_ASSERT -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -D_REENTRANT
PKG_CXXFLAGS += $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") \
$(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
PKG_LIBS += $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "RcppParallel::RcppParallelLibs()")