Enable LLVM_ENABLE_WARNINGS when building standalone out of tree
When built within the llvm runtimes directory, the runtimes
CMakeLists.txt adds the same.
Differential Revision: https://reviews.llvm.org/D56981
git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@351875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d5ac811..b03adaa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,6 +73,8 @@
endif()
if (EXISTS ${LLVM_CMAKE_PATH})
+ # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions.
+ set(LLVM_ENABLE_WARNINGS ON)
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
include("${LLVM_CMAKE_PATH}/AddLLVM.cmake")
include("${LLVM_CMAKE_PATH}/HandleLLVMOptions.cmake")