forked from security/hakurei
internal/rosa/cmake: pass parallel argument for make
This uses the default value for each build system, which is parallel for ninja but not for make. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -180,8 +180,10 @@ func (attr *CMakeHelper) script(name string) string {
|
||||
}
|
||||
|
||||
generate := "Ninja"
|
||||
jobs := ""
|
||||
if attr.Make {
|
||||
generate = "'Unix Makefiles'"
|
||||
jobs += ` "--parallel=$(nproc)"`
|
||||
}
|
||||
|
||||
return `
|
||||
@@ -198,7 +200,7 @@ cmake -G ` + generate + ` \
|
||||
}), " \\\n\t") + ` \
|
||||
-DCMAKE_INSTALL_PREFIX=/work/system \
|
||||
'/usr/src/` + name + `/` + path.Join(attr.Append...) + `'
|
||||
cmake --build .
|
||||
cmake --build .` + jobs + `
|
||||
cmake --install .
|
||||
` + attr.Script
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user