The viral nature applies if you "convey a work based on the Program, or the modifications to produce it from the Program" unless it is "a compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program" [0].
If that sounds vague enough to be interpreted in a lot of different ways to you, you're right. Even the FSF themselves admit it would be up to a court to decide[1] (which unfortunately in a lot of cases means whoever has the most money wins).
tl;dr - When in doubt, assume you need to make your work GPL too.
[0]: https://www.gnu.org/licenses/gpl-3.0.en.html
[1]: https://www.gnu.org/licenses/gpl-faq.html#MereAggregation