nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

CMakeLists.txt (1301B)


      1 cmake_minimum_required (VERSION 3.0.2)
      2 
      3 project (HashTest)
      4 
      5 SET(CMAKE_C_FLAGS_DEBUG "-g")
      6 SET(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
      7 
      8 add_executable (hash_test hash_test.c str_set.c token_map.c ht32.c ht64.c ht32rh.c ht64rh.c cmetrohash64.c)
      9 add_executable (hash_test_32 hash_test.c str_set.c token_map.c ht32.c ht64.c ht32rh.c ht64rh.c PMurHash.c)
     10 add_executable (hash_test_rh hash_test.c str_set.c token_map.c ht32.c ht64.c ht32rh.c ht64rh.c cmetrohash64.c)
     11 
     12 target_compile_definitions(hash_test_32 PRIVATE
     13     -DHT_HASH_32)
     14 target_compile_definitions(hash_test_rh PRIVATE
     15     -DSTR_SET_RH -DTOKEN_MAP_RH)
     16 
     17 add_executable (load_test load_test.c ptr_set.c)
     18 # robin hood hash table
     19 add_executable (load_test_rh load_test.c ptr_set.c)
     20 
     21 target_compile_definitions(load_test PRIVATE
     22     -DPTR_SET_INT_HASH)
     23 target_compile_definitions(load_test_rh PRIVATE
     24     -DPTR_SET_RH -DPTR_SET_INT_HASH)
     25 
     26 # default hash function
     27 add_executable (load_test_d load_test.c ptr_set.c cmetrohash64.c)
     28 add_executable (load_test_d_rh load_test.c ptr_set.c cmetrohash64.c)
     29 target_compile_definitions(load_test_rh PRIVATE
     30     -DPTR_SET_RH)
     31 
     32 add_test(hash_test hash_test)
     33 add_test(hash_test_32 hash_test_32)
     34 add_test(hash_test_rh hash_test_rh)
     35 add_test(load_test load_test)
     36 add_test(load_test_rh load_test_rh)
     37 
     38 enable_testing()