Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99f08e2b6e | ||
|
|
47ece66520 |
No files matched your search
@@ -62,3 +62,5 @@ build
|
||||
|
||||
tests/coverage
|
||||
tests/out
|
||||
|
||||
cmake
|
||||
@@ -0,0 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.8)
|
||||
|
||||
project(cmc)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
file(GLOB_RECURSE sources
|
||||
"./tests/main.c"
|
||||
)
|
||||
|
||||
add_definitions(-DCMC_CALLBACKS)
|
||||
|
||||
add_executable(cmc ${sources})
|
||||
|
||||
target_include_directories(cmc PUBLIC
|
||||
"./"
|
||||
)
|
||||
|
||||
@@ -29,6 +29,10 @@ docserve:
|
||||
mdbook serve documentation
|
||||
|
||||
install_dev_deps:
|
||||
sudo apt install gcc valgrind lcov clang-format
|
||||
sudo apt install gcc make valgrind lcov clang-format hyperfine clangd cmake
|
||||
cargo install mdbook
|
||||
|
||||
build_clangd:
|
||||
cmake -S . -G "Unix Makefiles" -B cmake
|
||||
|
||||
.PHONY: tests tests_dev format bench docbuild docserve install_dev_deps
|
||||
+5
-1
@@ -1,7 +1,11 @@
|
||||
CC=gcc
|
||||
INCLUDE=-I ../src
|
||||
INCLUDE=-I ..
|
||||
CFLAGS=-Wall -Wextra -Werror
|
||||
|
||||
benchmark: benchmark.c
|
||||
$(CC) $(CFLAGS) $(INCLUDE) $< -o ./$@.exe -lm
|
||||
./$@.exe
|
||||
|
||||
clean:
|
||||
rm *.exe -f
|
||||
rm *.txt -f
|
||||
@@ -1,4 +1,4 @@
|
||||
INCLUDE=-I ../../../src
|
||||
INCLUDE=-I ../../..
|
||||
CFLAGS=-O3 -Wall -Wextra -Werror -DCOUNT=20000000 -DCMC_NO_CALLBACKS
|
||||
|
||||
# Install hyperfine
|
||||
@@ -15,4 +15,5 @@ build:
|
||||
g++ unorderedmap.cpp $(INCLUDE) -o unorderedmap.exe $(CFLAGS)
|
||||
|
||||
clean:
|
||||
rm *.exe
|
||||
rm *.exe -f
|
||||
rm *.txt -f
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -65,7 +65,7 @@ enum cmc_flags
|
||||
*
|
||||
* Maps the error codes to their character representation.
|
||||
*/
|
||||
CMC_UNUSED static const char *cmc_flags_to_str[11] = {
|
||||
CMC_UNUSED static const char *cmc_flags_to_str[12] = {
|
||||
"OK", "ALLOC", "EMPTY", "NOT_FOUND", "INVALID", "RANGE", "DUPLICATE", "ERROR", "THREAD", "MUTEX", "FULL", "FTABLE"
|
||||
};
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 138 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user