Skip to content

Commit

Permalink
Add a new option to handle clang-tidy builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Jul 26, 2024
1 parent 0f7072c commit 1526337
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ if(${SUBSTRAIT_CPP_BUILD_TESTING})
enable_testing()
endif()

if(${CLANG_TIDY_BUILD})
add_compile_options(
"-Wno-attributes;-Wno-deprecated-declarations"
)
endif()

install(EXPORT SubstraitTargets DESTINATION lib/cmake/Substrait)

add_subdirectory(src/substrait)
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-clang-tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR="$( cd $SCRIPTDIR/.. && pwd )"
set -o errexit

echo Making compile_command.json
rm -rf tmp && mkdir tmp && cmake -Btmp -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSUBSTRAIT_CPP_ROUNDTRIP_TESTING=ON
rm -rf tmp && mkdir tmp && cmake -Btmp -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DSUBSTRAIT_CPP_BUILD_TESTING=OFF -DCLANG_TIDY_BUILD=ON
echo Building substrait protobuf
pushd tmp/src/substrait/proto
make -j
Expand Down

0 comments on commit 1526337

Please sign in to comment.