4.2. Build Options¶
4.2.1. Standard Options¶
Users basically can use CMake 3.1.0 standard options
(e.g., -DCMAKE_INSTALL_PREFIX) together with the unique options.
4.2.2. Unique Options¶
- PRIMITIV_BUILD_C_API
Default value:
OFFBuilds C APIs.
libprimitiv_clibrary file and headers in theprimitiv/cdirectory will also be installed.- PRIMITIV_BUILD_STATIC_LIBRARY
Default value:
OFFBuilds static libraries instead of shared objects.
- PRIMITIV_BUILD_TESTS
Default value:
OFFBuilds test binaries and generates
make testcommand. This option introduces a dependency to the Google Test. FindGTest options can also be used.- PRIMITIV_BUILD_TESTS_PROBABILISTIC
Default value:
OFFBuilds test cases that probabilistically fails.
- PRIMITIV_GTEST_SOURCE_DIR
Default value:
""Specifies the source directory of Google Test. If you want to use Google Test provided from Debian/Ubuntu repository, add
-DPRIMITIV_GTEST_SOURCE_DIR=/usr/src/googletest/googletesttogether with-PRIMITIV_BUILD_TESTS=ONoption.- PRIMITIV_USE_CACHE
Default value:
OFFWhether or not to use cached values to prevent increasing computation amount. Libraries built with this flag will tend to consume more memory.
- PRIMITIV_USE_EIGEN
Default value:
OFFEnables Eigen backend (
primitiv::devices::Eigenclass). This option introduces a dependency to the Eigen3 library, and FindEigen3 options can also be used.- PRIMITIV_USE_CUDA
Default value:
OFFEnables CUDA backend (
primitiv::devices::CUDAclass). This option introduces a dependency to the NVIDIA CUDA Toolkit v8.0 or later and cuDNN library v5.0 or later. FindCuda and FindCuDNN options can also be used.- PRIMITIV_USE_OPENCL
Default value:
OFFEnables OpenCL backend(
primitiv::devices::OpenCLclass). This option introduces dependencies to an OpenCL v1.2 implementation and OpenCL C++ Bindings v2. FindOpenCL options can also be used, andcl2.hppshould be found in/path/to/include/CL.