(options []string)
| 302 | } |
| 303 | |
| 304 | func (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 | |
| 324 | func (c cmake) installOptions() ([]string, error) { |
| 325 | // CMAKE_BUILD_TYPE is useless for MSVC, use --config Debug/Relase instead. |
nothing calls this directly
no test coverage detected