Skip to content

Autotools to CMake Options Mapping

Luke Dashjr edited this page Aug 23, 2025 · 5 revisions

Autotools to CMake Options Mapping

The Bitcoin Knots build system has been migrated from Autotools to CMake in v29.1.

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.1):

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
--disable-man INSTALL_MAN ON
--enable-debug CMAKE_BUILD_TYPE=Debug RelWithDebInfo
--with-append-cxxflags APPEND_CXXFLAGS
--enable-werror WERROR OFF
--enable-external-signer ENABLE_EXTERNAL_SIGNER ON
--disable-tor-subprocess ENABLE_TOR_SUBPROCESS 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-sanitizers SANITIZERS < empty >
--with-utils Not implemented. Use individual BUILD_* variables
--with-libs BUILD_BITCOINCONSENSUS_LIB OFF
--with-experimental-kernel-lib BUILD_KERNEL_LIB ${BUILD_UTIL_CHAINSTATE}
--with-daemon BUILD_DAEMON ON
--with-gui BUILD_GUI OFF
--with-gui=qt5 BUILD_GUI WITH_QT_VERSION=5 OFF
(Qt6 GUI) BUILD_GUI WITH_QT_VERSION=6 OFF
--with-qtdbus WITH_DBUS ${BUILD_GUI}
--with-incompatible-bdb WARN_INCOMPATIBLE_BDB ON
--with-boost Boost_INCLUDE_DIR < empty >
--with-system-leveldb WITH_SYSTEM_LEVELDB OFF
--with-system-libsecp256k1 WITH_SYSTEM_LIBSECP256K1 OFF

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

Clone this wiki locally