Skip to content

Commit

Permalink
deprecate LdFlags() and RcppLdFlags()
Browse files Browse the repository at this point in the history
plus some non-exported variants
  • Loading branch information
eddelbuettel committed Jul 28, 2018
1 parent 322fe66 commit 6f7639d
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 21 deletions.
11 changes: 10 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
2018-07-28 Dirk Eddelbuettel <edd@debian.org>

* R/RcppLdpath.R (RcppLdPath, RcppLdFlags, CxxFlags, RcppLdFlags)
(RcppCxx0xFlags): Marked as deprecated

* man/Rcpp-deprecated.Rd: Add exported functions LdFlags() and
RcppLdFlags() as deprecated
* man/RcppLdFlags.Rd: Idem

2018-07-27 Dirk Eddelbuettel <edd@debian.org>

* man/loadRcppModules-deprecated.Rd: Fix typo: was deprecated in
* man/loadRcppModules-deprecated.Rd: Fix typo; was deprecated in
0.12.5, not 0.16.5 which does not exist

2018-07-26 Dirk Eddelbuettel <edd@debian.org>
Expand Down
8 changes: 3 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exportMethods(prompt, show, .DollarNames, initialize, "formals<-")
export(Module,
Rcpp.package.skeleton,
populate,
loadRcppModules, # deprecated since Rcpp 0.12.5
loadRcppModules, # deprecated since Rcpp 0.12.5 released May 2016
setRcppClass,
loadRcppClass,
loadModule,
Expand All @@ -26,8 +26,8 @@ export(Module,
sourceCpp,
compileAttributes,
registerPlugin,
RcppLdFlags,
LdFlags,
RcppLdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018
LdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018
demangle,
sizeof,
cpp_object_initializer,
Expand All @@ -39,5 +39,3 @@ S3method(format, Rcpp_stack_trace)
S3method(str, Rcpp_stack_trace)
S3method(print, Rcpp_stack_trace)
exportClass(RcppClass)


24 changes: 18 additions & 6 deletions R/RcppLdpath.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
# Copyright (C) 2010 - 2018 Dirk Eddelbuettel and Romain Francois
#
# This file is part of Rcpp.
#
Expand All @@ -23,6 +23,8 @@ Rcpp.system.file <- function(...){
## Use R's internal knowledge of path settings to find the lib/ directory
## plus optinally an arch-specific directory on system building multi-arch
RcppLdPath <- function() {
.Deprecated(msg=paste("This function is now deprecated as it has not",
"been needed since 2013."))
""
}

Expand All @@ -33,8 +35,12 @@ RcppLdPath <- function() {
## Updated Jan 2010: We now default to static linking but allow the use
## of rpath on Linux if static==FALSE has been chosen
## Note that this is probably being called from LdFlags()
## Updated Nov 2013: We no longer build a library. This should be deprecated.
RcppLdFlags <- function() { "" }
## Updated Nov 2013: We no longer build a library. This should be deprecated.
RcppLdFlags <- function() {
.Deprecated(msg=paste("This function is now deprecated as it has not",
"been needed since 2013."))
""
}

# indicates if Rcpp was compiled with GCC >= 4.3
canUseCXX0X <- function() { TRUE } # .Call( "canUseCXX0X", PACKAGE = "Rcpp" )
Expand All @@ -52,8 +58,11 @@ RcppCxxFlags <- function(cxx0x=FALSE) {
## Shorter names, and call cat() directly
## CxxFlags defaults to no using c++0x extensions are these are considered non-portable
CxxFlags <- function(cxx0x=FALSE) {
.Deprecated(msg=paste("This function is now deprecated as R uses minimally",
"viable compilers om all platforme."))
cat(RcppCxxFlags(cxx0x=cxx0x))
}

## LdFlags defaults to static linking on the non-Linux platforms Windows and OS X
LdFlags <- function() {
cat(RcppLdFlags())
Expand All @@ -64,11 +73,14 @@ RcppCapabilities <- capabilities <- function() .Call( rcpp_capabilities )

# compile, load and call the cxx0x.c script to identify whether
# the compiler is GCC >= 4.3
RcppCxx0xFlags <- function(){
RcppCxx0xFlags <- function() {
.Deprecated(msg=paste("This function is now deprecated as R uses minimally",
"viable compilers om all platforme."))
script <- Rcpp.system.file( "discovery", "cxx0x.R" )
flag <- capture.output( source( script ) )
flag
}

Cxx0xFlags <- function() cat( RcppCxx0xFlags() )

Cxx0xFlags <- function() {
cat( RcppCxx0xFlags() )
}
11 changes: 10 additions & 1 deletion man/Rcpp-deprecated.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
\pkg{Rcpp} package only, and may be removed in future versions.
}
\details{
\code{loadRcppModules} calls should now be replaced by
\itemize{
\item \code{\link{loadRcppModules}} calls should now be replaced by
\code{\link{loadModule}} calls, one per Module.

\item \code{\link{LdFlags()}} and \code{\link{RcppLdFlags}} are no
longer required as no library is provided (or needed) by Rcpp (as it
was up until release 0.10.1).
}
}
\author{Dirk Eddelbuettel and Romain Francois}
\keyword{programming}
\keyword{interface}
18 changes: 10 additions & 8 deletions man/RcppLdFlags.Rd
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
\name{LdFlags}
\name{LdFlags-deprecated}
\alias{LdFlags}
\alias{RcppLdFlags}
\title{(Deprecated) Rcpp Linker Flags}
\title{Deprecated Rcpp Linker Flags}
\description{
In previous versions of Rcpp, \code{LdFlags} and \code{RcppLdFlags}
were used to return the required flags and options for the system linker to
link to the Rcpp user library. Since we no longer build or ship a
user library, these functions now return an empty string.
In Rcpp versions prior to release 0.10.1 of November 2013,
\code{LdFlags} and \code{RcppLdFlags} were used to return the required
flags and options for the system linker to link to the Rcpp user
library. Since we no longer build or ship a user library, these
functions now return an empty string. As of Rcpp release 0.12.19,
these functions are now deprecated.
}
\usage{
LdFlags()
RcppLdFlags()
LdFlags()
RcppLdFlags()
}
\value{
An empty string.
Expand Down

0 comments on commit 6f7639d

Please sign in to comment.