Skip to content

Commit 381d913

Browse files
committed
Switch unit test requiring c++11 support to use Rcpp:::capabilities()[["Full C++11 support"]] instead of unreliable compiler flag sniffing.
1 parent 579cb41 commit 381d913

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

inst/unitTests/runit.InternalFunctionCPP11.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
# You should have received a copy of the GNU General Public License
1919
# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
2020

21-
hasCXX11 <- grepl("-std=c\\+\\+1[1-9yz]", Sys.getenv("PKG_CXXFLAGS"))
21+
.runThisTest <- Sys.getenv("RunAllRcppTests") == "yes"
2222

23-
.runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" && hasCXX11
24-
25-
if( .runThisTest ) {
23+
if( .runThisTest && Rcpp:::capabilities()[["Full C++11 support"]] ) {
2624

2725
.tearDown <- function(){
2826
gc()

0 commit comments

Comments
 (0)