Skip to content

Commit 8376144

Browse files
committed
[cmake] Set IS_DEBUG with asserts enabled
1 parent d18f56c commit 8376144

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ if(${PACKAGE_VERSION} VERSION_LESS "7.0")
2121
endif()
2222

2323
# If asserts are enabled opt-sched must be built with "IS_DEBUG".
24-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DIS_DEBUG")
24+
if(LLVM_ENABLE_ASSERTIONS)
25+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIS_DEBUG")
26+
endif()
2527

2628
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2729

0 commit comments

Comments
 (0)