This will allow installation of data.table on systems / compilers that do not support openmp, even if the site Makeconf file defines SHLIB_OPENMP_CFLAGS. This is the case on macOS as of R 3.4.0 with the default clang compiler.
Something like the following should be sufficient, note that ifeq is a GNU make extension, so it will need to be noted in your DESCRIPTION
CXX11=$(shell "${R_HOME}"/bin/R CMD config CXX11)
ifeq ($(shell $(CXX11) -fopenmp -E -xc++ - 2>&1 >/dev/null && echo 'true'), true)
PKG_CFLAGS=$(SHLIB_OPENMP_CFLAGS)
PKG_LIBS=$(SHLIB_OPENMP_CFLAGS)
endif
This will allow installation of data.table on systems / compilers that do not support openmp, even if the site Makeconf file defines
SHLIB_OPENMP_CFLAGS. This is the case on macOS as of R 3.4.0 with the default clang compiler.Something like the following should be sufficient, note that
ifeqis a GNU make extension, so it will need to be noted in yourDESCRIPTION