user1436187
user1436187

Reputation: 3376

Submitting R package that use OpenMP

I tried to submit R package which support OpenMP (This package can be compiled in Linux if openmp is available).

I have got this error when I checked may package.

checking compilation flags in Makevars ... WARNING Non-portable flags in variable ‘PKG_CXXFLAGS’: -fopenmp

How can I suppress this error and submit it to the CRAN.

Upvotes: 5

Views: 743

Answers (1)

Kevin Ushey
Kevin Ushey

Reputation: 21285

From the R Extensions Manual, you need:

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)

See here for a recent R-help post with example CRAN packages and more information.

Upvotes: 11

Related Questions