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

Method configured

buildsystems/build_cmake.go:205–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

203}
204
205func (c cmake) configured() bool {
206 if err := c.detectGenerator(); err != nil {
207 color.Printf(color.Error, "failed to detect generator -> %s", err)
208 return false
209 }
210
211 switch c.CMakeGenerator {
212 case "Ninja":
213 cmakeCache := filepath.Join(c.PortConfig.BuildDir, "CMakeCache.txt")
214 buildFile := filepath.Join(c.PortConfig.BuildDir, "build.ninja")
215 ruluesFile := filepath.Join(c.PortConfig.BuildDir, "rules.ninja")
216 return fileio.PathExists(c.PortConfig.RepoDir) &&
217 fileio.PathExists(cmakeCache) &&
218 fileio.PathExists(buildFile) &&
219 fileio.PathExists(ruluesFile)
220
221 case "Unix Makefiles":
222 cmakeCache := filepath.Join(c.PortConfig.BuildDir, "CMakeCache.txt")
223 makefile := filepath.Join(c.PortConfig.BuildDir, "Makefile")
224 return fileio.PathExists(c.PortConfig.RepoDir) &&
225 fileio.PathExists(cmakeCache) &&
226 fileio.PathExists(makefile)
227
228 case visualStudio_18_2026, visualStudio_17_2022, visualStudio_16_2019, visualStudio_15_2017, visualStudio_14_2015:
229 cmakeCache := filepath.Join(c.PortConfig.BuildDir, "CMakeCache.txt")
230 slnFile := filepath.Join(c.PortConfig.BuildDir, c.PortConfig.LibName+".sln")
231 vcxprojFile := filepath.Join(c.PortConfig.BuildDir, c.PortConfig.LibName+".vcxproj")
232 return fileio.PathExists(c.PortConfig.RepoDir) &&
233 fileio.PathExists(cmakeCache) &&
234 fileio.PathExists(slnFile) &&
235 fileio.PathExists(vcxprojFile)
236 }
237
238 return false
239}
240
241func (c cmake) Configure(options []string) error {
242 toolchain := c.Ctx.Platform().GetToolchain()

Callers

nothing calls this directly

Calls 3

detectGeneratorMethod · 0.95
PrintfFunction · 0.92
PathExistsFunction · 0.92

Tested by

no test coverage detected