Skip to content

Commit afaf4be

Browse files
authored
Add log output when overriding a global setting (#80)
1 parent 31ffab8 commit afaf4be

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/ecbuild_add_option.cmake

+3
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ macro( ecbuild_add_option )
159159

160160
# Allow override of ENABLE_<FEATURE> with <PNAME>_ENABLE_<FEATURE> (see ECBUILD-486)
161161
if( DEFINED ${PNAME}_ENABLE_${_p_FEATURE} )
162+
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): found ${PNAME}_ENABLE_${_p_FEATURE}=${${PNAME}_ENABLE_${_p_FEATURE}}")
162163
# Cache it for future reconfiguration
163164
set( ${PNAME}_ENABLE_${_p_FEATURE} ${${PNAME}_ENABLE_${_p_FEATURE}} CACHE BOOL "Override for ENABLE_${_p_FEATURE}" )
164165
# Warn when user provides both ENABLE_<FEATURE> and <PNAME>_ENABLE_<FEATURE>, and explain precedence
@@ -168,6 +169,8 @@ macro( ecbuild_add_option )
168169
endif()
169170
# Non-cache (hard) override of ENABLE_<FEATURE> within this project scope only
170171
set( ENABLE_${_p_FEATURE} ${${PNAME}_ENABLE_${_p_FEATURE}} )
172+
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): set ENABLE_${_p_FEATURE} from ${PNAME}_ENABLE_${_p_FEATURE}")
173+
ecbuild_debug("ecbuild_add_option(${_p_FEATURE}): ENABLE_${_p_FEATURE}=${ENABLE_${_p_FEATURE}}")
171174
endif()
172175

173176
## Update the description of the feature summary

0 commit comments

Comments
 (0)