summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-10-20 18:16:37 +0000
committerChris Bieneman <beanz@apple.com>2015-10-20 18:16:37 +0000
commit20263fdbfb77522f56df6521a1a09af214a1d7e0 (patch)
treeda49ca2f4251e25a4e8b4a859e37de8f9e8d7b89 /CMakeLists.txt
parente5b90ccacc6aa8735dcbc1915d29c2c9db289671 (diff)
[CMake] All the checks for if LLVM_VERSION_* variables are set need to be if(DEFINED ...)
This is because if you set one of the variables to 0, if(NOT ...) is true, which isn't what you actually want. Should have thought that through better the first time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82e937e7ade..bbfd68d5590 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,13 +26,13 @@ else()
set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
endif()
-if(NOT LLVM_VERSION_MAJOR)
+if(NOT DEFINED LLVM_VERSION_MAJOR)
set(LLVM_VERSION_MAJOR 3)
endif()
-if(NOT LLVM_VERSION_MINOR)
+if(NOT DEFINED LLVM_VERSION_MINOR)
set(LLVM_VERSION_MINOR 8)
endif()
-if(NOT LLVM_VERSION_PATCH)
+if(NOT DEFINED LLVM_VERSION_PATCH)
set(LLVM_VERSION_PATCH 0)
endif()
if(NOT DEFINED LLVM_VERSION_SUFFIX)