add auto build script

This commit is contained in:
tqchen 2014-09-06 22:20:11 -07:00
parent 43a781f59b
commit a7a0b34a54
3 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,5 @@
export CC = gcc
export CXX = g++
export CXX = clang++
export LDFLAGS= -pthread -lm
export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas -fPIC -pedantic

View File

@ -30,7 +30,7 @@ Features
Build
=====
* Simply type make
* Run ```bash build.sh``` (you can also type make)
* If your compiler does not come with OpenMP support, it will fire an warning telling you that the code will compile into single thread mode, and you will get single thread xgboost
* You may get a error: -lgomp is not found
- You can type ```make no_omp=1```, this will get you single thread xgboost

11
build.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
if make; then
echo "Successfully build multi-thread xgboost"
else
echo "-----------------------------"
echo "Building multi-thread xgboost failed"
echo "Start to build single-thread xgboost"
make clean
make no_omp=1
echo "Successfully build single-thread xgboost"
fi