Skip to content

Commit b730d8f

Browse files
committed
Use USE_CXX1X for cpp11 plugin when R >= 3.1
1 parent 744507c commit b730d8f

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2014-04-30 JJ Allaire <[email protected]>
2+
3+
* R/Attributes.R: Use USE_CXX1X for cpp11 plugin when R >= 3.1
4+
15
2014-04-02 Dirk Eddelbuettel <[email protected]>
26

37
* tests/doRUnit.R: Better RUnit error report with thanks to Murray

R/Attributes.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ compileAttributes <- function(pkgdir = ".", verbose = getOption("verbose")) {
392392

393393
# built-in C++11 plugin
394394
.plugins[["cpp11"]] <- function() {
395-
list(env = list(PKG_CXXFLAGS ="-std=c++11"))
395+
if (getRversion() >= "3.1")
396+
list(env = list(USE_CXX1X = ""))
397+
else
398+
list(env = list(PKG_CXXFLAGS ="-std=c++11"))
396399
}
397400

398401
## built-in OpenMP++11 plugin

inst/NEWS.Rd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
\item Trailing line comments are now stripped by the attributes
1212
parser. This allows the parser to handle C++ source files
1313
containing comments inline with function arguments.
14+
\item The \code{USE_CXX1X} environment variable is now defined by
15+
the cpp11 plugin when R >= 3.1
1416
}
1517
}
1618

0 commit comments

Comments
 (0)