diff --git a/CMake/Macros.cmake b/CMake/Macros.cmake index 49ae47e706..2acd7ff98b 100644 --- a/CMake/Macros.cmake +++ b/CMake/Macros.cmake @@ -141,6 +141,9 @@ macro(curl_add_clang_tidy_test_target _target_clang_tidy _target) # Collect macro definitions applying to the target get_directory_property(_definitions_d COMPILE_DEFINITIONS) get_target_property(_definitions_t ${_target} COMPILE_DEFINITIONS) + if(NOT _definitions_t) + unset(_definitions_t) + endif() set(_definitions "${_definitions_l};${_definitions_d};${_definitions_t}") list(REMOVE_ITEM _definitions "")