you could use $(cmake-utils_use threads VISIT_THREAD)