MCPcopy Create free account
hub / github.com/celer-pkg/celer / Build

Method Build

buildsystems/build_cmake.go:304–322  ·  view source on GitHub ↗
(options []string)

Source from the content-addressed store, hash-verified

302}
303
304func (c cmake) Build(options []string) error {
305 // Assemble args.
306 var args []string
307 args = append(args, "--build", c.PortConfig.BuildDir)
308 args = append(args, options...)
309 args = append(args, "--parallel", strconv.Itoa(c.PortConfig.Jobs))
310
311 // Execute build.
312 logPath := c.getLogPath("build")
313 title := fmt.Sprintf("[build %s@%s]", c.PortConfig.LibName, c.PortConfig.LibVersion)
314 executor := cmd.NewExecutor(title, "cmake", args...)
315 executor.SetWorkDir(c.PortConfig.BuildDir)
316 executor.SetLogPath(logPath)
317 if err := executor.Execute(); err != nil {
318 return err
319 }
320
321 return nil
322}
323
324func (c cmake) installOptions() ([]string, error) {
325 // CMAKE_BUILD_TYPE is useless for MSVC, use --config Debug/Relase instead.

Callers

nothing calls this directly

Calls 6

NewExecutorFunction · 0.92
SprintfMethod · 0.80
SetWorkDirMethod · 0.80
SetLogPathMethod · 0.80
ExecuteMethod · 0.80
getLogPathMethod · 0.65

Tested by

no test coverage detected