Skip to content

Configuration Options for CMake

Louis Dionne edited this page Nov 16, 2015 · 2 revisions

Building and running the tests provided by Hana may be influenced by a number of configuration flags. These would be given as arguments to cmake, prefixed with -D, followed by the variable name, an equal sign, and the value. For instance,

cmake .. -DCMAKE_CXX_COMPILER=clang++

In addition to the following table, a full list of variables may be obtained with cmake-gui.

CMake Variables Values Default Description
CMAKE_CXX_COMPILER path auto Path to your C++ compiler of choice
CMAKE_CXX_FLAGS string unset Additional user-defined flags for the C++ compiler
BOOST_HANA_ENABLE_CONCEPT_CHECKS ON / OFF ON Enable concept checking in the interface methods.
BOOST_HANA_ENABLE_EXCEPTIONS ON / OFF ON Build tests with exceptions enabled.
BOOST_HANA_ENABLE_MEMCHECK ON / OFF OFF Run the unit tests and examples under Valgrind, if it is found.
BOOST_HANA_ENABLE_STRING_UDL ON / OFF ON Enable GNU extension for string literal operator templates
BOOST_HANA_ENABLE_WERROR ON / OFF OFF Fail and stop if a warning is triggered.
BOOST_ROOT path auto Path to full boost installation, only required if detection fails.
MPL11_INCLUDE_DIR path auto Path to MPL11 include directory. When set, this will be used as-is.
MPL11_CLONE_IF_MISSING ON / OFF OFF If MPL11 include directory can't be found and this is set to true, the MPL11 project will be cloned locally.
Meta_INCLUDE_DIR path auto Path to Meta include directory. When set, this will be used as-is.
Meta_CLONE_IF_MISSING ON / OFF OFF If Meta include directory can't be found and this is set to true, the MPL11 project will be cloned locally.
Valgrind_EXECUTABLE path auto Path to the Valgrind executable.
Clone this wiki locally