From 6c0bf5aca097922b12a1278590d5fdacdab17bb8 Mon Sep 17 00:00:00 2001 From: stalker320 <40300537+stalker57241@users.noreply.github.com> Date: Mon, 20 Jul 2026 22:14:10 +0300 Subject: [PATCH 1/2] Create CMakeLists.txt Added cmake file for integration to projects using github submodules --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2f8c24d --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.10) +option(HASHMAP_TEST, OFF) + +project(hashmap_c LANGUAGES C) +add_library(hashmap_c STATIC "hashmap.c") +target_include_directories(hashmap_c PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") + +if(HASHMAP_TEST) + target_compile_definitions(hashmap.c PRIVATE HASHMAP_TEST) +endif() From ddbcba057b0f679a6581648fda551dfa85a2504f Mon Sep 17 00:00:00 2001 From: stalker320 <40300537+stalker57241@users.noreply.github.com> Date: Mon, 20 Jul 2026 22:16:09 +0300 Subject: [PATCH 2/2] Update CMakeLists.txt Fixed CMakeLists.txt, added option description --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f8c24d..275b6d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -option(HASHMAP_TEST, OFF) +option(HASHMAP_TEST "Enable hashmap test. To Enable hashmap benchmark enable O3 optimisation" OFF) project(hashmap_c LANGUAGES C) add_library(hashmap_c STATIC "hashmap.c")