1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-02-17 11:45:50 +00:00

Import pbl c library

This commit is contained in:
King_DuckZ 2016-04-18 22:52:35 +02:00
parent 7515705c05
commit 3e130cd346
5 changed files with 62 additions and 0 deletions

3
.gitmodules vendored
View file

@ -1,3 +1,6 @@
[submodule "test/gtest"]
path = test/gtest
url = https://github.com/google/googletest.git
[submodule "lib/pbl/pbl"]
path = lib/pbl/pbl
url = https://github.com/peterGraf/pbl.git

View file

@ -100,6 +100,7 @@ endif()
add_subdirectory(src/pq)
add_subdirectory(src/common)
add_subdirectory(src/machinery)
add_subdirectory(lib/pbl)
#Actions
add_subdirectory(src/main)

55
lib/pbl/CMakeLists.txt Normal file
View file

@ -0,0 +1,55 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(pbl C)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_RELEASE} -Wall")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -O3")
option(PBL_WITH_TESTS "Enable building test programs" ON)
#add_library(${PROJECT_NAME} INTERFACE)
#target_include_directories(${PROJECT_NAME}
# INTERFACE .
#)
add_library(pbl STATIC
pbl/src/src/pblStringBuilder.c
pbl/src/src/pblPriorityQueue.c
pbl/src/src/pblHeap.c
pbl/src/src/pblMap.c
pbl/src/src/pblSet.c
pbl/src/src/pblList.c
pbl/src/src/pblCollection.c
pbl/src/src/pblIterator.c
pbl/src/src/pblisam.c
pbl/src/src/pblkf.c
pbl/src/src/pblhash.c
pbl/src/src/pbl.c
)
target_include_directories(pbl
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src/src
)
target_compile_definitions(pbl
PUBLIC PBLTEST
)
if (PBL_WITH_TESTS)
enable_testing()
set(pbl_tests
httst
kftst
iftst
kfblockprint
ListTest
SetTest
Perform
MapTest
PriorityQueueTest
)
foreach (test_name ${pbl_tests})
add_executable(pbl${test_name} pbl/src/src/pbl${test_name}.c)
target_link_libraries(pbl${test_name} pbl)
add_test(${test_name} pbl${test_name})
endforeach()
endif()

1
lib/pbl/pbl Submodule

@ -0,0 +1 @@
Subproject commit 362f7e598dc38aba3c195e10830259f728531e83

View file

@ -10,10 +10,12 @@ add_executable(${PROJECT_NAME}
target_include_directories(${PROJECT_NAME}
PRIVATE ${CMAKE_SOURCE_DIR}/include
PRIVATE ${CMAKE_SOURCE_DIR}/lib/pbl/pbl/src
)
target_link_libraries(${PROJECT_NAME}
PRIVATE ${bare_name}-inc
PRIVATE pbl
)
if (DINDEXER_WITH_MEDIA_AUTODETECT)