I have searched and cannot find what should be a simple thing. I need to know the proper syntax to pass what would be -j=3 on the command line to cmake-ninja. The simple reason is ninja by default uses something like 1 less than total virtual CPUs or perhaps physical. When building small things not a problem. When building the nearly 4K modules of CopperSpice the heavy use of templates means each “cpu” tends to need 8GB of RAM. I only have 24GB so I have to trim to 3. Yes, the machine runs out of virtual memory and locks up if I let it run flat out. Been there, done that, got the hat, T-shirt, drink holder, and bumper sticker.
It seems there should be a build-option one could add here, but I cannot find any documentation.
"modules": [
{
"name": "copperspice",
"buildsystem": "cmake-ninja",
"builddir": true,
"build-options" : {
"cxxflags": "-Wno-error"
},
"no-parallel-make": false,
"config-opts": [
"-DCMAKE_BUILD_TYPE=Release",
"-Wno-dev"
],
"sources": [
{
"type": "git",
"url": "https://github.com/copperspice/copperspice.git"
}
]
}
]
What shouldn’t work, but appears to is this in the command file to launch the build.
# --force-clean
flatpak-builder --user --jobs=3 --install "$BUILD_DIR" "$SCRIPT_DIR/org.flatpak.RedDiamond.json"
I have searched and cannot find the doc. Can someone point me to the official documentation for cmake-ninja build options?