Skip to content

Commit

Permalink
use all cores to build on linux (#4304)
Browse files Browse the repository at this point in the history
  • Loading branch information
rongou authored and hcho3 committed Mar 28, 2019
1 parent 3f312e3 commit 8c8021d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jvm-packages/create_jni.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,14 @@ def normpath(path):
maybe_generator = ' -G"Visual Studio 14 Win64"'
else:
maybe_generator = ""
if sys.platform == "linux":
maybe_parallel_build = " -- -j $(nproc)"
else:
maybe_parallel_build = ""

args = ["-D{0}:BOOL={1}".format(k, v) for k, v in CONFIG.items()]
run("cmake .. " + " ".join(args) + maybe_generator)
run("cmake --build . --config Release")
run("cmake --build . --config Release" + maybe_parallel_build)

with cd("demo/regression"):
run(sys.executable + " mapfeat.py")
Expand Down

0 comments on commit 8c8021d

Please sign in to comment.