CMakePresets and Ninja Parallel level (-j)
We just recently moved up to a new enough version of CMake to be able to use CMakePresets.json and CMakeUserPresets.json which are cool and all but I have noticed that now when I build in CLion I am getting the "-j 6" added onto the build command.
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/mjackson/Workspace1/DREAM3D-Build/DREAM3DNX-Release-arm64 --target all -j 6
I have reviewed our Presets file and just cannot figure out where the added -j 6 is coming from. My computer has 8 cores (not hyper threaded). Is this just CLion trying to be nice and not take all my CPU? If so how do I turn that off? If not, anyone have any idea where I would go looking to figure out how this is getting added to our build commands?
Please sign in to leave a comment.
Hello!
CLion sets the
-j
flag by default, see https://www.jetbrains.com/help/clion/cmake-profile.html#build-options for the explanation. You can redefine it in theBuild options
field of CMake profile or in a CMake preset.