From baf1444929f4592aa36711cda6700a937e6c4613 Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 10 Sep 2021 00:07:07 -0700 Subject: [PATCH] [CMake] Use NOT instead of STREQUAL ` STREQUAL ""` fails when `` is unset which can be the case when using runtimes as top-level build. Use `NOT` instead. Differential Revision: https://reviews.llvm.org/D109570 --- runtimes/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index e926c3c30f49..b88aa46c663d 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -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)