summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andreas.fried@kit.edu>2019-05-24 13:17:40 +0200
committerAndreas Fried <andreas.fried@kit.edu>2019-05-24 13:18:06 +0200
commitd5fa45903bb3a95ab292470247cf1a11c7913cc4 (patch)
tree56ed2f1466b359deccd9ae80e4e93e4fbe2de507
parentc51b78eee4c662efc99dd3d813dbf12eac4b9052 (diff)
Set DEBUG_libfirm for CMake debug builds.
In order to build libfirm with debugging enabled, use cmake -DCMAKE_BUILD_TYPE=Debug. It also works if you build cparser, cmake will pass the option along.
-rw-r--r--CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 065687a..c605556 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,8 @@ set(PROJECT_DESCRIPTION "library implementing the intermediate representation Fi
set(CMAKE_C_VISIBILITY_PRESET hidden)
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_libfirm")
+
set(SOURCES
ir/adt/array.c
ir/adt/bipartite.c