mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 19:09:23 -05:00
Add Python script to build all combinations of modules
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import os
|
||||
from subprocess import call
|
||||
from itertools import product, repeat
|
||||
|
||||
# To be called from the OpenSpace main folder
|
||||
modules = os.listdir("modules")
|
||||
modules.remove("base")
|
||||
|
||||
# Get 2**len(modules) combinatorical combinations of ON/OFF
|
||||
settings = []
|
||||
for args in product(*repeat(("ON", "OFF"), len(modules))):
|
||||
settings.append(args)
|
||||
|
||||
# Create all commands
|
||||
cmds = []
|
||||
for s in settings:
|
||||
cmd = ["cmake", "-DGHOUL_USE_DEVIL=NO", "-DOPENSPACE_MODULE_BASE=ON"]
|
||||
|
||||
for m,s in zip(modules, s):
|
||||
cmd.append("-DOPENSPACE_MODULE_" + m.upper() + "=" + s)
|
||||
cmds.append(cmd)
|
||||
|
||||
# Build cmake and compile
|
||||
for c in cmds:
|
||||
call(cmd)
|
||||
call(["make", "clean"])
|
||||
call(["make", "-j4"])
|
||||
|
||||
Reference in New Issue
Block a user