From 27814bbae0854adb916d39f82c29590e903c3584 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Tue, 23 Jul 2019 12:36:50 +0200 Subject: Switching default build to C99 --- CMakeLists.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dd2f15..93e5d15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,20 @@ cmake_minimum_required(VERSION 2.8.11) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c11") -set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c99") set(BUILD_EXAMPLES 0 CACHE BOOL "Build the included examples projects") +set(LINK_DYNAMIC 0 CACHE BOOL "Set the default linking behaviour to `dynamic`") project(bowl) -add_library(bowl SHARED array.c - bowl.c - data.c - hash.c - utils.c) +set(SRC array.c + bowl.c + data.c + hash.c + utils.c) + +if(LINK_DYNAMIC) + add_library(bowl SHARED ${SRC}) +else() + add_library(bowl STATIC ${SRC}) +endif() target_include_directories(bowl PUBLIC ".") -- cgit v1.2.3