How to use cmake in a snap setting the parallel level to 1

I’m building a library that I want to force the number of parallel jobs to 1 (to overcome a parallel build dependency failure).

Is there way to force cmake to do this with CMAKE_BUILD_PARALLEL_LEVEL? I’m not a cmake expert so I’m not sure how to do this in snapcraft

you should be able to use build-environment: to set this variable inside your part … see the bottom of: