[CMake] Use NOT instead of STREQUAL

`<var> STREQUAL ""` fails when `<var>` is unset which can be the
case when using runtimes as top-level build. Use `NOT` instead.

Differential Revision: https://reviews.llvm.org/D109570
This commit is contained in:
Petr Hosek 2021-09-10 00:07:07 -07:00
parent b2528fc490
commit baf1444929
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ endif()
# If building standalone by pointing CMake at this runtimes directory,
# LLVM_BINARY_DIR isn't set, find_package(LLVM) will fail and these
# intermediate paths are unset.
if (LLVM_BINARY_DIR STREQUAL "")
if (NOT LLVM_BINARY_DIR)
set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
endif()
if (NOT LLVM_FOUND)