detect cores available for build