Skip to content

Commit c27f0cb

Browse files
authored
Merge pull request #887 from RcppCore/feature/deprecate_ldflags
Feature/deprecate ldflags
2 parents 322fe66 + 7a0e41d commit c27f0cb

File tree

5 files changed

+51
-21
lines changed

5 files changed

+51
-21
lines changed

ChangeLog

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
2018-07-28 Dirk Eddelbuettel <[email protected]>
2+
3+
* R/RcppLdpath.R (RcppLdPath, RcppLdFlags, CxxFlags, RcppLdFlags)
4+
(RcppCxx0xFlags): Marked as deprecated
5+
6+
* man/Rcpp-deprecated.Rd: Add exported functions LdFlags() and
7+
RcppLdFlags() as deprecated
8+
* man/RcppLdFlags.Rd: Idem
9+
110
2018-07-27 Dirk Eddelbuettel <[email protected]>
211

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

615
2018-07-26 Dirk Eddelbuettel <[email protected]>

NAMESPACE

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ exportMethods(prompt, show, .DollarNames, initialize, "formals<-")
1616
export(Module,
1717
Rcpp.package.skeleton,
1818
populate,
19-
loadRcppModules, # deprecated since Rcpp 0.12.5
19+
loadRcppModules, # deprecated since Rcpp 0.12.5 released May 2016
2020
setRcppClass,
2121
loadRcppClass,
2222
loadModule,
@@ -26,8 +26,8 @@ export(Module,
2626
sourceCpp,
2727
compileAttributes,
2828
registerPlugin,
29-
RcppLdFlags,
30-
LdFlags,
29+
RcppLdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018
30+
LdFlags, # deprecated since Rcpp 0.12.19 released Sep 2018
3131
demangle,
3232
sizeof,
3333
cpp_object_initializer,
@@ -39,5 +39,3 @@ S3method(format, Rcpp_stack_trace)
3939
S3method(str, Rcpp_stack_trace)
4040
S3method(print, Rcpp_stack_trace)
4141
exportClass(RcppClass)
42-
43-

R/RcppLdpath.R

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
1+
# Copyright (C) 2010 - 2018 Dirk Eddelbuettel and Romain Francois
22
#
33
# This file is part of Rcpp.
44
#
@@ -23,6 +23,8 @@ Rcpp.system.file <- function(...){
2323
## Use R's internal knowledge of path settings to find the lib/ directory
2424
## plus optinally an arch-specific directory on system building multi-arch
2525
RcppLdPath <- function() {
26+
.Deprecated(msg=paste("This function is now deprecated as it has not",
27+
"been needed since 2013."))
2628
""
2729
}
2830

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

3945
# indicates if Rcpp was compiled with GCC >= 4.3
4046
canUseCXX0X <- function() { TRUE } # .Call( "canUseCXX0X", PACKAGE = "Rcpp" )
@@ -52,8 +58,11 @@ RcppCxxFlags <- function(cxx0x=FALSE) {
5258
## Shorter names, and call cat() directly
5359
## CxxFlags defaults to no using c++0x extensions are these are considered non-portable
5460
CxxFlags <- function(cxx0x=FALSE) {
61+
.Deprecated(msg=paste("This function is now deprecated as R uses minimally",
62+
"viable compilers om all platforme."))
5563
cat(RcppCxxFlags(cxx0x=cxx0x))
5664
}
65+
5766
## LdFlags defaults to static linking on the non-Linux platforms Windows and OS X
5867
LdFlags <- function() {
5968
cat(RcppLdFlags())
@@ -64,11 +73,14 @@ RcppCapabilities <- capabilities <- function() .Call( rcpp_capabilities )
6473

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

73-
Cxx0xFlags <- function() cat( RcppCxx0xFlags() )
74-
84+
Cxx0xFlags <- function() {
85+
cat( RcppCxx0xFlags() )
86+
}

man/Rcpp-deprecated.Rd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
\pkg{Rcpp} package only, and may be removed in future versions.
77
}
88
\details{
9-
\code{loadRcppModules} calls should now be replaced by
9+
\itemize{
10+
\item \code{\link{loadRcppModules}} calls should now be replaced by
1011
\code{\link{loadModule}} calls, one per Module.
12+
13+
\item \code{\link{LdFlags()}} and \code{\link{RcppLdFlags}} are no
14+
longer required as no library is provided (or needed) by Rcpp (as it
15+
was up until release 0.10.1).
16+
}
1117
}
18+
\author{Dirk Eddelbuettel and Romain Francois}
19+
\keyword{programming}
20+
\keyword{interface}

man/RcppLdFlags.Rd

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
\name{LdFlags}
1+
\name{LdFlags-deprecated}
22
\alias{LdFlags}
33
\alias{RcppLdFlags}
4-
\title{(Deprecated) Rcpp Linker Flags}
4+
\title{Deprecated Rcpp Linker Flags}
55
\description{
6-
In previous versions of Rcpp, \code{LdFlags} and \code{RcppLdFlags}
7-
were used to return the required flags and options for the system linker to
8-
link to the Rcpp user library. Since we no longer build or ship a
9-
user library, these functions now return an empty string.
6+
In Rcpp versions prior to release 0.10.1 of November 2013,
7+
\code{LdFlags} and \code{RcppLdFlags} were used to return the required
8+
flags and options for the system linker to link to the Rcpp user
9+
library. Since we no longer build or ship a user library, these
10+
functions now return an empty string. As of Rcpp release 0.12.19,
11+
these functions are now deprecated.
1012
}
1113
\usage{
12-
LdFlags()
13-
RcppLdFlags()
14+
LdFlags()
15+
RcppLdFlags()
1416
}
1517
\value{
1618
An empty string.

0 commit comments

Comments
 (0)