1
0
Fork 0
forked from lthn/blockchain
blockchain/cmake/check-config-vars.cmake
Snider e3910d8a59 Refactor config variable checks into macro
Replaces repetitive individual variable checks with a macro to streamline and simplify the process of verifying required configuration variables in CMake.
2025-09-25 18:28:10 +01:00

30 lines
583 B
CMake

macro(check_defined_vars)
foreach(var ${ARGN})
if(NOT DEFINED ${var})
message(FATAL_ERROR "${var} not set")
endif()
endforeach()
endmacro()
check_defined_vars(
currency_display_decimal_point
coin
base_reward_dust_threshold
default_dust_threshold
tx_default_fee
tx_minimum_fee
difficulty_pow_starter
difficulty_pos_target
difficulty_pow_target
difficulty_window
difficulty_lag
difficulty_cut
p2p_default_port
rpc_default_port
stratum_default_port
p2p_maintainers_pub_key
currency_name_abr
currency_name_base
currency_name_short_base
)