def _cmake_cmd_line_args(conanfile, generator, parallel): args = [] if not generator: return args # Arguments related to parallel if parallel: if "Makefiles" in generator and "NMake" not in generator: njobs = make_jobs_cmd_line_arg(conanfile) if njobs: args.append(njobs) if "Ninja" in generator and "NMake" not in generator: njobs = ninja_jobs_cmd_line_arg(conanfile) if njobs: args.append(njobs) if "Visual Studio" in generator: max_cpu_count = msbuild_max_cpu_count_cmd_line_arg(conanfile) if max_cpu_count: args.append(max_cpu_count) # Arguments for verbosity if "Visual Studio" in generator: verbosity = msbuild_verbosity_cmd_line_arg(conanfile) if verbosity: args.append(verbosity) return args
def make(self, target=None): make_program = self._conanfile.conf["tools.gnu:make_program"] if make_program is None: make_program = "mingw32-make" if self._use_win_mingw() else "make" str_args = self._make_args jobs = "" if "-j" not in str_args and "nmake" not in make_program.lower(): jobs = make_jobs_cmd_line_arg(self._conanfile) or "" command = join_arguments([make_program, target, str_args, jobs]) self._conanfile.run(command)