Enable LLVM_ENABLE_WARNINGS when building standalone out of tree
authorMartin Storsjo <martin@martin.st>
Tue, 22 Jan 2019 20:43:37 +0000 (20:43 +0000)
committerMartin Storsjo <martin@martin.st>
Tue, 22 Jan 2019 20:43:37 +0000 (20:43 +0000)
When built within the llvm runtimes directory, the runtimes
CMakeLists.txt adds the same.

Differential Revision: https://reviews.llvm.org/D56979

llvm-svn: 351873

libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake

index e50d0262f804184e3bb36b6f45582cd394c8fb33..3b19c5c15cd1e5f2363b803f2930ae1fdbea2256 100644 (file)
@@ -93,6 +93,8 @@ macro(configure_out_of_tree_llvm)
     endif()
   endif()
   if (LLVM_FOUND)
+    # Enable warnings, otherwise -w gets added to the cflags by HandleLLVMOptions.
+    set(LLVM_ENABLE_WARNINGS ON)
     include(AddLLVM OPTIONAL)
     include(HandleLLVMOptions OPTIONAL)
   endif()