find_program(<VAR> ...) sets <VAR> to <VAR>-NOTFOUND if nothing was found.
So we need to compare <VAR> with "<VAR>-NOTFOUND" or just use if([NOT] <VAR>), because if(<VAR>) is false if <VAR> ends in the suffix -NOTFOUND.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Ah, good catch, thank you! Alternatively there seems to be Package_FOUND variable but what your propose is cleaner.
Do you want me to land the patch for you?