Unverified Commit d8e22ae5 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[Dev] Enable to append more cmake arguments for build (#5431)

parent 5854ef5e
......@@ -10,21 +10,25 @@ examples:
Start a CUDA build: bash $0 -g
Build incrementally: bash $0
Remove all intermediate output and restart a CPU only build: bash $0 -c -r
Build with extra cmake arguments: bash $0 -c -e '-DUSE_AVX=ON'
Build DGL. By default, build incrementally on top of the current state.
OPTIONS:
-h Show this message.
-c Restart CPU only build.
-e Extra arguments of cmake.
-g Restart CUDA build.
-r Remove all intermediate output.
EOF
}
# Parse flags.
while getopts "cghr" flag; do
while getopts "ce:ghr" flag; do
if [[ ${flag} == "c" ]]; then
cuda="OFF"
elif [[ ${flag} == "e" ]]; then
extra_args=${OPTARG}
elif [[ ${flag} == "g" ]]; then
cuda="ON"
elif [[ ${flag} == "r" ]]; then
......@@ -65,7 +69,7 @@ if [[ -z ${cuda} ]]; then
else
mkdir -p build
cd build
cmake -DUSE_CUDA=${cuda} ..
cmake -DUSE_CUDA=${cuda} ${extra_args} ..
fi
if [[ ${PWD} == "${DGL_HOME}/build" ]]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment