Skip to content

Commit

Permalink
[CMake] Use NOT instead of STREQUAL
Browse files Browse the repository at this point in the history
`<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
  • Loading branch information
petrhosek committed Sep 10, 2021
1 parent b2528fc commit baf1444
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtimes/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit baf1444

Please sign in to comment.