MCPcopy Create free account
hub / github.com/XiaoBaiiiiii/colmap-pcd / build_ceres_solver

Function build_ceres_solver

scripts/python/build.py:383–418  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

381
382
383def build_ceres_solver(args):
384 path = os.path.join(args.build_path, "ceres-solver")
385 if os.path.exists(path):
386 return
387
388 url = "https://github.com/ceres-solver/ceres-solver/archive/2.1.0.zip"
389 archive_path = os.path.join(args.download_path, "ceres-solver-2.1.0.zip")
390 download_zipfile(url, archive_path, args.build_path,
391 "0d4fbfd9d381b85a362365c8d5f468c8")
392 shutil.move(os.path.join(args.build_path, "ceres-solver-2.1.0"), path)
393
394 extra_config_args = [
395 "-DBUILD_TESTING=OFF",
396 "-DBUILD_EXAMPLES=OFF",
397 ]
398
399 if args.with_suite_sparse:
400 extra_config_args.extend([
401 "-DLAPACK=ON",
402 "-DSUITESPARSE=ON",
403 ])
404 if PLATFORM_IS_WINDOWS:
405 extra_config_args.extend([
406 "-DLAPACK_LIBRARIES={}".format(
407 os.path.join(args.install_path,
408 "lib64/lapack_blas_windows/liblapack.lib")),
409 "-DBLAS_LIBRARIES={}".format(
410 os.path.join(args.install_path,
411 "lib64/lapack_blas_windows/libblas.lib")),
412 ])
413
414 if PLATFORM_IS_WINDOWS:
415 extra_config_args.append("-DCMAKE_CXX_FLAGS=/DGOOGLE_GLOG_DLL_DECL=")
416
417 build_cmake_project(args, os.path.join(path, "__build__"),
418 extra_config_args=extra_config_args)
419
420
421def build_colmap(args):

Callers 1

mainFunction · 0.85

Calls 2

download_zipfileFunction · 0.85
build_cmake_projectFunction · 0.85

Tested by

no test coverage detected