From 156f8de5c04df9d0bb4a405049a59d8436bd498e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Mon, 4 Jul 2016 16:17:16 +0200 Subject: [PATCH] Strict compiler with reldeb default build. --- CMakeLists.txt | 6 +++++- src/Main.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a5e2488..080a54a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,11 @@ cmake_minimum_required(VERSION 2.6) project(MMMCalc) -set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic-errors") +if(CMAKE_BUILD_TYPE STREQUAL "") + set(CMAKE_BUILD_TYPE RelWithDebInfo) +endif() + +set(CMAKE_C_FLAGS "-std=gnu99 -Wall -Wextra -Werror -Wpedantic -Wmissing-declarations -Wfatal-errors -pedantic-errors") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -O0") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O3") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -O3") diff --git a/src/Main.c b/src/Main.c index c1fe429..d3f0cdb 100644 --- a/src/Main.c +++ b/src/Main.c @@ -5,7 +5,7 @@ char version[16] = "v0.5"; int verbose = 0; -int main(int argc, char **argv) { +int main(/*int argc, char **argv*/) { printf("MMMCalc %s, Copyright (c) 2016 Nicolás A. Ortega.\n", version); printf("This program comes with ABSOLUTELY NO WARRANTY.\n"); printf("This program is free software and you are welcome to redistribute\n");