diff --git a/R-package/src/Makevars b/R-package/src/Makevars index e03a15425..e5f386f9b 100644 --- a/R-package/src/Makevars +++ b/R-package/src/Makevars @@ -1,9 +1,9 @@ # package root PKGROOT=../../ # _*_ mode: Makefile; _*_ -PKG_CPPFLAGS= -DXGBOOST_CUSTOMIZE_MSG_ -DXGBOOST_CUSTOMIZE_PRNG_ -I$(PKGROOT) -PKG_CXXFLAGS= $(SHLIB_OPENMP_CFLAGS) -PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) +PKG_CPPFLAGS= -DXGBOOST_CUSTOMIZE_MSG_ -DXGBOOST_CUSTOMIZE_PRNG_ -Wpedantic -I$(PKGROOT) +PKG_CXXFLAGS= +PKG_LIBS = OBJECTS= xgboost_R.o $(PKGROOT)/wrapper/xgboost_wrapper.o $(PKGROOT)/src/io/io.o $(PKGROOT)/src/gbm/gbm.o $(PKGROOT)/src/tree/updater.o diff --git a/src/utils/omp.h b/src/utils/omp.h index 0380ebd67..933ad97f6 100644 --- a/src/utils/omp.h +++ b/src/utils/omp.h @@ -9,13 +9,8 @@ #include #else #ifndef DISABLE_OPENMP -#ifndef _MSC_VER -#warning "OpenMP is not available, compile to single thread code."\ - "You may want to ungrade your compiler to enable OpenMP support,"\ - "to get benefit of multi-threading." -#else -// TODO add warning for msvc -#endif +// use pragma message instead of warning +#pragma message "Warning: OpenMP is not available, xgboost will be compiled into single thread code. You may want to ungrade your compiler to enable OpenMP support, to get benefit of multi-threading." #endif inline int omp_get_thread_num() { return 0; } inline int omp_get_num_threads() { return 1; } diff --git a/src/utils/utils.h b/src/utils/utils.h index 625bc2d48..9d235d82a 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -19,7 +19,7 @@ #else #ifdef _FILE_OFFSET_BITS #if _FILE_OFFSET_BITS == 32 -#warning "FILE OFFSET BITS defined to be 32 bit" +#pragma message "Warning: FILE OFFSET BITS defined to be 32 bit" #endif #endif