Dear Simon and Dirk, Thank you so much for the answers. I really appreciate your help.
Best regards, Naeem On Mon, Aug 9, 2021 at 8:32 PM Dirk Eddelbuettel <e...@debian.org> wrote: > > (I replied earlier but that seems to have gotten lost. Apologies to anybody > who may receive two copies, and thanks to Simon for his answer. -- Dirk) > > > On 9 August 2021 at 17:04, Naeem Khoshnevis wrote: > | Do you know a workaround for this issue? > > Wrap the #include by #ifdef _OPENMP and #endif > > Test for presence of OpenMP (for example via a configure script). > > Use the standard R compilation flags. RcppArmadillo uses > > PKG_CXXFLAGS = -I../inst/include @OPENMP_FLAG@ > PKG_LIBS= @OPENMP_FLAG@ $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) > > where @OPENMP_FLAG@ gets set if OpenMP is found. Other packages just use > > PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) > PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) > > relying on R which sets SHLIB_OPENMP_CXXFLAGS. > > Dirk > > -- > https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org >
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel