-
Notifications
You must be signed in to change notification settings - Fork 503
Development Builds
The CMAKE_BUILD_TYPE
flag can be configured as:
-
debug
: The default warning level for builds. Debug symbols are retained, and no optimizations are applied. Approximate to-ggdb -O0
-
release
: Debug symbols are stripped, and all optimizations are applied. Approximate to-DNDEBUG -O3
-
fastdebug
: Debug symbols are retained, and safe optimizations are applied. Approximate to-ggdb -O1
-
relwithdebinfo
: Debug symbols are retained, and most optimizations are applied. Approximate to-ggdb -O2
You can change the build type by passing -DCMAKE_BUILD_TYPE=<setting>
to CMake.
Our CMake system has a BUILD_WARNING_LEVEL
flag to adjust predefined warning levels. The available settings are:
-
checkin
: The default warning level for builds. Warnings are reported as errors. Approximate to-Wall -Werror
-
production
: Warnings are not reported as errors. Approximate to-Wall
-
everything
: Pedantic warning level. Approximate to-Weverything -Werror
on Clang and-Wall -Wpedantic -Wextra -Werror
on GCC.
You can change the warning level by passing -DBUILD_WARNING_LEVEL=<setting>
to CMake.
Developers should familiarize themselves with the following make
targets:
-
terrier
: builds the terrier binary and its dependencies. -
unittest
: builds our Google Test suite, executes them, and summarizes the results. -
runbenchmark
: builds our Google Benchmark suite, executes them, and summarizes the results.
See our Testing page for more details.
-
check-clang-tidy
: Runsclang-tidy
with our rules on thesrc
,benchmark
,test
folder and summarizes the results. -
check-format
: Runsclang-format
with our rules on thesrc
folder and summarizes the results. -
format
: Runsclang-format
with our rules on thesrc
folder and fixes any issues.
See our Formatting page for more details.
We have the following CMake flags to enable Google's Sanitizers:
-
TERRIER_USE_ASAN
: Enables AddressSanitizer. -
TERRIER_USE_TSAN
: Enables ThreadSanitizer. -
TERRIER_USE_UBSAN
: Enables UndefinedBehaviorSanitizer.
You can enable Sanitizers by passing -D<sanitizer flag>=ON
to CMake.
We have a TERRIER_TEST_MEMCHECK
CMake flag to enable Valgrind's Memcheck on the Google Test suite. You can enable it by passing -DTERRIER_TEST_MEMCHECK=ON
to CMake.
Pull requests are run through travis-ci and Jenkins for continuous integration. You can avoid build failures by running the following checks before submitting your pull request:
make format
make lint
make check-clang-tidy
make unittest
Use debug
build type, checkin
warning level, and AddressSanitizer enabled.
Carnegie Mellon Database Group Website