From 1b9225dd2a2994714e9bac1135f4443be76c974d Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Fri, 19 Nov 2021 16:29:44 +0100 Subject: [PATCH] Add cmake option to enable debug logs It can be enabled with -DENABLE_DEBUG_LOG=ON --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc71577..ac633e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,12 @@ add_compile_options(-Wall -Wextra -Wformat set(CMAKE_C_STANDARD 11) set(CMAKE_C_EXTENSIONS FALSE) +option(ENABLE_DEBUG_LOG "Enable debug messages (very verbose)") + +if(ENABLE_DEBUG_LOG) + add_definitions(-DENABLE_DEBUG) +endif() + include(CheckIPOSupported) check_ipo_supported(RESULT ipo_available OUTPUT error LANGUAGES C)