WIP: [ug][cmake] Fix building test-parallel-ug
Backport of !561 (merged) and the commit introducing the second CMAKE_GUARD argument
Edited by Christoph Grüninger
Backport of !561 (merged) and the commit introducing the second CMAKE_GUARD argument