Skip to content

Commit

Permalink
always rebuild compilation database, but --force the symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
moxian committed Jan 19, 2025
1 parent 7f94ecb commit db82486
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions build-scripts/clang-tidy-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,19 @@ TILES=${TILES:-1}
SOUND=${SOUND:-1}

# create compilation database (compile_commands.json)
if [ ! -f compile_commands.json ]
then
mkdir -p build
cd build
cmake \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
${COMPILER:+-DCMAKE_CXX_COMPILER=$COMPILER} \
-DCMAKE_BUILD_TYPE="Release" \
-DBACKTRACE=${BACKTRACE} \
-DLOCALIZE=${LOCALIZE} \
-DTILES=${TILES} \
-DSOUND=${SOUND} \
..
cd ..
ln -s build/compile_commands.json .
fi
mkdir -p build
cd build
cmake \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
${COMPILER:+-DCMAKE_CXX_COMPILER=$COMPILER} \
-DCMAKE_BUILD_TYPE="Release" \
-DBACKTRACE=${BACKTRACE} \
-DLOCALIZE=${LOCALIZE} \
-DTILES=${TILES} \
-DSOUND=${SOUND} \
..
cd ..
ln --force --symbolic build/compile_commands.json .

if [ ! -f build/tools/clang-tidy-plugin/libCataAnalyzerPlugin.so ]
then
Expand Down

0 comments on commit db82486

Please sign in to comment.