asc_bin 2025.5.14

An automated C/C++ package manager, source code scanner, and builder that streamlines dependency management, enhances code analysis, and simplifies the build process.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{cli, util};

pub fn exec(options: &cli::commands::scan::ScanOptions) {
    // download if not exists
    let cmake_path = super::download::download_cmake_if_not_exists();

    let mut args = vec![
        "--build",
        &options.target_dir,
        "--config",
        options.cmake_config.as_ref(),
    ];
    if !options.project.is_empty() {
        args.extend(vec!["--target", &options.project]);
    }
    util::shell::run(&cmake_path, &args, ".", false, false, false).unwrap();
}