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

Function build_colmap

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

Source from the content-addressed store, hash-verified

419
420
421def build_colmap(args):
422 extra_config_args = []
423 if args.qt_path != "":
424 extra_config_args.append("-DQt5_DIR={}".format(
425 os.path.join(args.qt_path, "lib/cmake/Qt5")))
426
427 if args.boost_path != "":
428 extra_config_args.append(
429 "-DBOOST_ROOT={}".format(args.boost_path))
430 extra_config_args.append(
431 "-DBOOST_LIBRARYDIR={}".format(args.boost_path))
432
433 if args.cuda_path != "":
434 extra_config_args.append(
435 "-DCUDA_TOOLKIT_ROOT_DIR={}".format(args.cuda_path))
436
437 if args.with_cuda:
438 extra_config_args.append("-DCUDA_ENABLED=ON")
439 else:
440 extra_config_args.append("-DCUDA_ENABLED=OFF")
441
442 if args.cuda_archs:
443 extra_config_args.append("-DCMAKE_CUDA_ARCHITECTURES={}".format(args.cuda_archs))
444
445 if args.with_opengl:
446 extra_config_args.append("-DOPENGL_ENABLED=ON")
447 else:
448 extra_config_args.append("-DOPENGL_ENABLED=OFF")
449
450 if args.with_tests:
451 extra_config_args.append("-DTESTS_ENABLED=ON")
452 else:
453 extra_config_args.append("-DTESTS_ENABLED=OFF")
454
455 if args.cgal_path:
456 extra_config_args.append("-DCGAL_DIR={}".format(args.cgal_path))
457
458 if PLATFORM_IS_WINDOWS:
459 extra_config_args.append("-DCMAKE_CXX_FLAGS=/DGOOGLE_GLOG_DLL_DECL=")
460
461 mkdir_if_not_exists(os.path.join(args.build_path, "colmap"))
462
463 build_cmake_project(args, os.path.join(args.build_path, "colmap/__build__"),
464 extra_config_args=extra_config_args,
465 cmakelists_path=os.path.abspath(args.colmap_path))
466
467
468def build_post_process(args):

Callers 1

mainFunction · 0.85

Calls 2

build_cmake_projectFunction · 0.85
mkdir_if_not_existsFunction · 0.70

Tested by

no test coverage detected