Changing the code to the snippet below seems to correct the error (although I haven’t used it enough to detect potential undesirable side effects)
if(NOT ("${BSP_EXPLICIT_LOCATION}" STREQUAL ""))
set(_load_regular_bsps 0)
else()
if((NOT ("${BSP_SOURCE}" STREQUAL "")))
if("${VISUALGDB_COMPONENT_LISTS_DIR}" STREQUAL "")
set(_load_regular_bsps 0)
endif()
endif()
endif()