See implementation here: https://github.com/Kitware/VTK/blob/master/CMake/vtkCompilerPlatformFlags.cmake#L122
Could set processor count with something like this: https://cmake.org/cmake/help/v3.13/module/ProcessorCount.html