-
Notifications
You must be signed in to change notification settings - Fork 505
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.
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
folders and summarizes the results. -
check-format
: Runsclang-format
with our rules on thesrc
,benchmark
, andtest
folders and summarizes the results. -
check-lint
: Runscpplint.py
with our rules on thesrc
,benchmark
, andtest
folders and summarizes the results. -
format
: Runsclang-format
with our rules on thesrc
,benchmark
, andtest
folders and fixes any issues.
We have the following CMake flags to enable Google's Sanitizers:
-
TERRIER_USE_ASAN
: Enables AddressSanitizer. -
TERRIER_USE_TSAN
: Enables ThreadSanitizer (currently untested). -
TERRIER_USE_UBSAN
: Enables UndefinedBehaviorSanitizer (currently untested).
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.
We allow jemalloc to be linked to the project with the TERRIER_USE_JEMALLOC
CMake flag. Note that we have seen unusual behavior when combining jemalloc with AddressSanitizer and Valgrind. We recommend only enabling jemalloc for profiling/benchmarking on Release builds with sanitizers disabled.
You can enable jemalloc by passing -DTERRIER_USE_JEMALLOC=ON
to CMake.
Pull requests are run through Jenkins for continuous integration. You can avoid build failures by running the following checks before submitting your pull request:
make format
make check-lint
make check-clang-tidy
make unittest
Use debug
build type, checkin
warning level, and AddressSanitizer enabled. For more details, see the dedicated Pull Request Process page.
Carnegie Mellon Database Group Website