-
Notifications
You must be signed in to change notification settings - Fork 505
Development Builds
Our CMAKE_BUILD_TYPE
flag is 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
folder and summarizes the results. -
check-format
: Runsclang-format
with our rules on thesrc
folder and summarizes the results. -
clang-tidy
: Runsclang-tidy
with our rules on thesrc
folder and attempts to fix any issues. -
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 unittest
We run our CI builds at the checkin
warning level with AddressSanitizer enabled, so please do the same to catch failures.
Carnegie Mellon Database Group Website