593dedb6 |
BUILT_RCPP_VERSION = package_version("@BUILT_RCPP_VERSION@")
.onLoad <-
function(libname, pkgname) {
## checkeing installed vs build-time Rcpp version
if (Sys.info()['sysname'] %in% c("Darwin", "Windows")) {
|
e839ff21 |
installedRcpp <- utils::packageVersion("Rcpp")
|
31a53551 |
if (installedRcpp != BUILT_RCPP_VERSION) { # use > instead of !=?
|
392c4f0e |
msg <- paste0("mzR has been built against a different Rcpp version (", BUILT_RCPP_VERSION, ")\n",
|
1fc8bbc2 |
"than is installed on your system (", installedRcpp, "). This might lead to errors\n",
"when loading mzR. If you encounter such issues, please send a report,\n",
|
ccd35ca5 |
"including the output of sessionInfo() to the Bioc support forum at \n",
"https://support.bioconductor.org/. For details see also\n",
|
1fc8bbc2 |
"https://github.com/sneumann/mzR/wiki/mzR-Rcpp-compiler-linker-issue.")
|
31a53551 |
warning(msg)
|
593dedb6 |
}
}
|
1497f23e |
require2 <- require
require2("methods", character.only = TRUE, quietly = TRUE)
|
31a53551 |
#loadRcppModules()
loadModule("Pwiz", TRUE)
loadModule("Ident", TRUE)
|
84a4b166 |
Sys.setenv("HDF5_DISABLE_VERSION_CHECK"=2)
}
|