Skip to content

Commit

Permalink
build: switched from make to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
dleeds-cpi committed Jul 11, 2018
1 parent 9e00b36 commit 1a5bac8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf
/build/
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 2.8)

project(hashmap)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused -Werror")

file(GLOB SOURCES src/*.c)

# Shared library
add_library(hashmap SHARED ${SOURCES})
target_include_directories(hashmap PUBLIC src)
10 changes: 10 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 2.8)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wunused -Werror")

# Build hashmap library with metrics enabled
add_definitions(-DHASHMAP_METRICS)

include_directories(../src)

add_executable(hashmap_test ../src/hashmap.c hashmap_test.c)
22 changes: 0 additions & 22 deletions test/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion test/hashmap_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ bool test_reset(struct hashmap *map, void **keys)
return true;
}

const struct test const tests[] = {
const struct test tests[] = {
{
.name = "put performance",
.description = "put new hash keys",
Expand Down

0 comments on commit 1a5bac8

Please sign in to comment.