From de9cae20fec1a040893adc9b29d47fee3c7272d7 Mon Sep 17 00:00:00 2001 From: Don Hinton Date: Wed, 27 Sep 2017 21:19:56 +0000 Subject: Cleanup some problems with LLVM_ENABLE_DUMP in release builds, and always set LLVM_ENABLE_DUMP=ON for +Asserts builds. Differential Revision: https://reviews.llvm.org/D38306 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314346 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b5454499df3..410c6afa17e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -388,15 +388,19 @@ option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF) option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF) +option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF) + if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF) else() option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON) endif() -option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF) +if( LLVM_ENABLE_ASSERTIONS ) + set(LLVM_ENABLE_DUMP ON) +endif() -option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF) +option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF) set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING "Enable abi-breaking checks. Can be WITH_ASSERTS, FORCE_ON or FORCE_OFF.") -- cgit v1.2.3