change warning to pragma message
This commit is contained in:
parent
485e0f140e
commit
6641fa546d
@ -1,9 +1,9 @@
|
|||||||
# package root
|
# package root
|
||||||
PKGROOT=../../
|
PKGROOT=../../
|
||||||
# _*_ mode: Makefile; _*_
|
# _*_ mode: Makefile; _*_
|
||||||
PKG_CPPFLAGS= -DXGBOOST_CUSTOMIZE_MSG_ -DXGBOOST_CUSTOMIZE_PRNG_ -I$(PKGROOT)
|
PKG_CPPFLAGS= -DXGBOOST_CUSTOMIZE_MSG_ -DXGBOOST_CUSTOMIZE_PRNG_ -Wpedantic -I$(PKGROOT)
|
||||||
PKG_CXXFLAGS= $(SHLIB_OPENMP_CFLAGS)
|
PKG_CXXFLAGS=
|
||||||
PKG_LIBS = $(SHLIB_OPENMP_CFLAGS)
|
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
|
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>
|
#include <omp.h>
|
||||||
#else
|
#else
|
||||||
#ifndef DISABLE_OPENMP
|
#ifndef DISABLE_OPENMP
|
||||||
#ifndef _MSC_VER
|
// use pragma message instead of warning
|
||||||
#warning "OpenMP is not available, compile to single thread code."\
|
#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."
|
||||||
"You may want to ungrade your compiler to enable OpenMP support,"\
|
|
||||||
"to get benefit of multi-threading."
|
|
||||||
#else
|
|
||||||
// TODO add warning for msvc
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
inline int omp_get_thread_num() { return 0; }
|
inline int omp_get_thread_num() { return 0; }
|
||||||
inline int omp_get_num_threads() { return 1; }
|
inline int omp_get_num_threads() { return 1; }
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
#else
|
#else
|
||||||
#ifdef _FILE_OFFSET_BITS
|
#ifdef _FILE_OFFSET_BITS
|
||||||
#if _FILE_OFFSET_BITS == 32
|
#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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user