From: Evgeniy Stepanov Date: Thu, 3 Jan 2019 22:41:10 +0000 (+0000) Subject: [cmake] Fix monorepo + LLVM_BUILD_EXTERNAL_COMPILER_RT=ON. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=700276059e0a944bb0f0418891a1f52e1bd0af9b;p=clang [cmake] Fix monorepo + LLVM_BUILD_EXTERNAL_COMPILER_RT=ON. In cmake 3.10.2, if (${VARIABLE_NAME}) seems to always be false no matter what documentation says (or maybe I just failed at reading). Anyway, if (VARIABLE_NAME) seems to do what this code intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@350361 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 9c2f5cd9cf..3de9612180 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -28,7 +28,7 @@ set(COMPILER_RT_SRC_ROOT ${LLVM_MAIN_SRC_DIR}/projects/compiler-rt) # variable) as in add_llvm_external_project if(NOT EXISTS ${COMPILER_RT_SRC_ROOT}) # We don't want to set it if LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR is "" - if(${LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR}) + if(LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR) set(COMPILER_RT_SRC_ROOT ${LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR}) endif() endif()