[PATCH] D109570: [CMake] Use NOT instead of STREQUAL
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 10 00:09:52 PDT 2021
phosek created this revision.
phosek added a reviewer: mstorsjo.
Herald added a subscriber: mgorny.
phosek requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
`<var> STREQUAL ""` fails when `<var>` is unset which can be the
case when using runtimes as top-level build. Use `NOT` instead.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D109570
Files:
runtimes/CMakeLists.txt
Index: runtimes/CMakeLists.txt
===================================================================
--- runtimes/CMakeLists.txt
+++ runtimes/CMakeLists.txt
@@ -61,7 +61,7 @@
# 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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109570.371797.patch
Type: text/x-patch
Size: 489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210910/65f39fd5/attachment.bin>
More information about the llvm-commits
mailing list