]> granicus.if.org Git - clang/commitdiff
[cmake] Fix monorepo + LLVM_BUILD_EXTERNAL_COMPILER_RT=ON.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 3 Jan 2019 22:41:10 +0000 (22:41 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 3 Jan 2019 22:41:10 +0000 (22:41 +0000)
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

runtime/CMakeLists.txt

index 9c2f5cd9cf12f7b4b86cc6ea460d9955d1aae2aa..3de9612180bfeae1e9cc856362ad7475226c2ae9 100644 (file)
@@ -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()