add auto build script
This commit is contained in:
parent
43a781f59b
commit
a7a0b34a54
2
Makefile
2
Makefile
@ -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
|
||||
|
||||
@ -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
11
build.sh
Executable 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
|
||||
Loading…
x
Reference in New Issue
Block a user