[CMake] Avoid REVERSE on unset variable

If required_libs happens to remain unset, CMake would fail with:

  list sub-command REVERSE requires list to be present.

Fix by ensuring we do not attempt to reverse an unset variable.

Reported by Tu Vuong.

Differential Revision: https://reviews.llvm.org/D51799

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@343088 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed