Skip to content

Autotools to CMake Options Mapping

maflcko edited this page Apr 15, 2025 · 3 revisions

Autotools to CMake Options Mapping

The Bitcoin Core build system has been migrated from Autotools to CMake in v29.0.

The CMake variables have fixed default values and are not auto-detected at runtime. Any CMake build that requires values different from the defaults must explicitly set them. CMake will print a configure summary, which can be used to verify the build configuration.

Below is a mapping from Autotools configure script options (as for v28.1) to the corresponding CMake variables (for v29.0):

Autotools configure option * CMake variable name CMake variable default value
--prefix CMAKE_INSTALL_PREFIX
--enable-shared BUILD_SHARED_LIBS=ON
--enable-static BUILD_SHARED_LIBS=OFF or skip it
--disable-wallet ENABLE_WALLET ON
--enable-usdt WITH_USDT OFF
--disable-tests BUILD_TESTS ON
--disable-gui-tests BUILD_GUI_TESTS ${BUILD_GUI} & ${BUILD_TESTS}
--disable-bench BUILD_BENCH OFF
--enable-fuzz BUILD_FOR_FUZZING OFF
--enable-fuzz-binary BUILD_FUZZ_BINARY OFF
--disable-hardening ENABLE_HARDENING ON
--enable-reduce-exports REDUCE_EXPORTS OFF
--disable-ccache WITH_CCACHE ON
--enable-suppress-external-warnings External warnings are suppressed out-of-the-box
--enable-lcov CMAKE_BUILD_TYPE=Coverage
--disable-zmq WITH_ZMQ OFF
--enable-multiprocess WITH_MULTIPROCESS OFF
--disable-man INSTALL_MAN ON
--enable-debug CMAKE_BUILD_TYPE=Debug RelWithDebInfo
--enable-werror WERROR OFF
--enable-external-signer ENABLE_EXTERNAL_SIGNER ON
--enable-util-cli BUILD_CLI ON
--enable-util-tx BUILD_TX ${BUILD_TESTS}
--enable-util-wallet BUILD_WALLET_TOOL ${BUILD_TESTS} & ${ENABLE_WALLET}
--enable-util-util BUILD_UTIL ${BUILD_TESTS}
--enable-experimental-util-chainstate BUILD_UTIL_CHAINSTATE OFF
--with-sqlite WITH_SQLITE ${ENABLE_WALLET}
--without-bdb WITH_BDB OFF
--with-natpmp WITH_NATPMP OFF
--with-qrencode WITH_QRENCODE ${BUILD_GUI}
--with-libmultiprocess Libmultiprocess_DIR < empty >
--with-mpgen LibmultiprocessGen_DIR < empty >
--with-sanitizers SANITIZERS < empty >
--with-utils Not implemented. Use individual BUILD_* variables
--with-experimental-kernel-lib BUILD_KERNEL_LIB ${BUILD_UTIL_CHAINSTATE}
--with-daemon BUILD_DAEMON ON
--with-gui BUILD_GUI OFF
--with-qtdbus WITH_DBUS ${BUILD_GUI}
--with-incompatible-bdb WARN_INCOMPATIBLE_BDB ON
--with-boost Boost_INCLUDE_DIR < empty >

* - Listed as in the ./configure --help output.