change warning to pragma message
This commit is contained in:
parent
485e0f140e
commit
6641fa546d
@ -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
|
||||
|
||||
|
||||
|
||||
@ -9,13 +9,8 @@
|
||||
#include <omp.h>
|
||||
#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; }
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user