From 3e21336c787038ea0ff05901074a1e4125a785aa Mon Sep 17 00:00:00 2001 From: Florent Leclercq Date: Fri, 17 Mar 2023 16:31:02 +0100 Subject: [PATCH] added debug profile --- .gitignore | 2 +- README.md | 1 + debug | 2 ++ src/main.c | 6 ++++++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 debug diff --git a/.gitignore b/.gitignore index 567609b..a5309e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -build/ +build*/ diff --git a/README.md b/README.md index c0fc953..5bfc26a 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ conan profile detect --force * Install dependencies with conan ``` conan install . --output-folder=build --build=missing +conan install . --output-folder=build_debug --build=missing --profile=debug ``` * Build with meson ``` diff --git a/debug b/debug new file mode 100644 index 0000000..6ff0ac3 --- /dev/null +++ b/debug @@ -0,0 +1,2 @@ +[options] +build_type=Debug diff --git a/src/main.c b/src/main.c index dfd5284..a03cbc4 100644 --- a/src/main.c +++ b/src/main.c @@ -9,5 +9,11 @@ int main(int argc, char **argv) { return 1; } printf("This is project %s.\n", PROJECT_NAME); + + #ifdef NDEBUG + printf("Release configuration!\n"); + #else + printf("Debug configuration!\n"); + #endif return 0; }