From 837614433da459990a069e77c4229cd6c4548ae3 Mon Sep 17 00:00:00 2001 From: Austin Kerbow Date: Sat, 22 Aug 2020 10:33:19 -0700 Subject: [PATCH] [cmake] Set IS_DEBUG with asserts enabled --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 986e383b..d7d1ec1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,9 @@ if(${PACKAGE_VERSION} VERSION_LESS "7.0") endif() # If asserts are enabled opt-sched must be built with "IS_DEBUG". -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DIS_DEBUG") +if(LLVM_ENABLE_ASSERTIONS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIS_DEBUG") +endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON)