dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

How should we fix the NOTE "checking use of SHLIB_OPENMP_*FLAGS in Makefiles"? #105

Closed ShotaOchi closed 3 years ago

ShotaOchi commented 5 years ago

"R CMD check" returns the following NOTE.

checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... NOTE checking use of SHLIB_OPENMP_*FLAGS in Makefiles ... NOTE src/Makevars.win: SHLIB_OPENMP_CFLAGS is included in PKG_LIBS but linking is by C++ src/Makevars.win: it is not portable to include SHLIB_OPENMP_*' macros in PKG_CPPFLAGS Use of these macros is discussed in sect 1.2.1.1 of ‘Writing R Extensions’. The macros for different languages may differ so the matching macro must be used in PKG_CXXFLAGS (etc) and match that used in PKG_LIBS (except for Fortran: see the manual). PKG_CPPFLAGS is used for both C and C++ code so it is not portable to use it for these macros.

I confirmed "R CMD check" didn't return the NOTE after modifying Makevars.win as shown below.

Is this modification OK?

The following URLs are reference. https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Portable-C-and-C_002b_002b-code https://cran.r-project.org/doc/manuals/r-release/R-exts.html#OpenMP-support