Make a build directory (or build/libdap4 if libdap4 is a git submodule). Then, in that directory, run cmake with the source directory as a command line argument.
For the submodule case, from inside the repo's top-level, where libdap is in a directory named 'external':
mkdir build/libdap4
cmake ../../external/libdap4For the 'normal' case, where 'build' is made inside the libdap4 top-level source directory:
mkdir build/
cd build
cmake ../NB: Include these on the command line using -D=
- CMAKE_VERBOSE_MAKEFILE=ON: Build Makefiles that enable debugging missing/mangled command line switches that are (or are not) passed to compilers, et cetera.
- CMAKE_INSTALL_PREFIX=$(pwd)/install: Install in $(pwd)/install. You can use any writable directory.
Special switches for libdap4
- USE_ASAN=ON: Turn on the compiler/linker address sanitizer
- BUILD_DEVELOPER=ON: Turn on developer mode.
With most of the unit tests added, build and test times were good.
make 55.14s user 9.42s system 99% cpu 1:04.91 totalTime to run the unit tests:
100% tests passed, 0 tests failed out of 54
Total Test time (real) = 9.18 sec
make test 2.01s user 0.29s system 24% cpu 9.247 totalmake -j20 71.36s user 13.38s system 1001% cpu 8.461 totalTime to run the unit tests:
100% tests passed, 0 tests failed out of 54
Total Test time (real) = 2.35 sec
make test -j20 2.20s user 0.14s system 98% cpu 2.381 total