rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.83k stars 313 forks source link

can't install bear without sudo #565

Closed LacueyDavid closed 6 months ago

LacueyDavid commented 6 months ago

Hello! I'm currently in an environment without sudo privilege, and I wonder if there is a way to install bear without sudo privilege?

thanks for reading.

rizsotto commented 6 months ago

Hey @LacueyDavid , sure you can do that.

export VERBOSE=1
mkdir -p $build_dir
cmake -B $build_dir -S $source_dir -DCMAKE_INSTALL_PREFIX:PATH="$install_dir" -DCMAKE_INSTALL_LIBDIR=lib64
cmake --build $build_dir --target clean;
cmake --build $build_dir --parallel 18;
mkdir -p $install_dir;
cmake --build $build_dir --target install;

you will need to define source_dir (where Bear sources are), build_dir and install_dir. For the CMAKE_INSTALL_LIBDIR value, read the INSTALL.md file.

LacueyDavid commented 6 months ago

Work perfectly, thank you!