From 5f58ae8a39d8acc66acac8f2cc743752c9f8eb9f Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 21 Dec 2016 13:26:26 -0800 Subject: [PATCH] Add compiler settings like C standard and warning level. --- CMakeLists.txt | 2 ++ src/ht.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4f2349..68606a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 2.7) project(libds) +set_property(GLOBAL PROPERTY C_STANDARD 90) +ADD_COMPILE_OPTIONS(-pedantic -Wall) include_directories(include) add_library(ds src/libds.c src/vec.c src/ht.c) diff --git a/src/ht.c b/src/ht.c index 3347953..6ef1127 100644 --- a/src/ht.c +++ b/src/ht.c @@ -126,4 +126,4 @@ int ht_foreach(ht* ht, void* data, compare_func compare, foreach_func foreach, . } } return return_code; -} \ No newline at end of file +}