diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e8ae2f4..b8488a2a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,17 +3,30 @@ project(cgen) # ON by default, use -DNOWARN=ON/OFF in Cmake command to turn ON/OFF option(NOWARN "ON-No warnings, OFF-Tend to show all warnings" ON) -option(DEBUG "Debug build" ON) option(BENCH_OP "Optimization (O1, O2, O3) benchmark" OFF) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -if (DEBUG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") -else (DEBUG) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") +set(CMAKE_C_STANDARD 11) + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug") +endif (NOT CMAKE_BUILD_TYPE) + +if (${CMAKE_BUILD_TYPE} STREQUAL Debug) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall") +endif() + +if (${CMAKE_BUILD_TYPE} STREQUAL Release) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -w") endif() +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-function") + +if (WARN_ERROR) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") +endif () + if (NOWARN) MESSAGE(STATUS "cgen no warnings") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w") @@ -26,7 +39,7 @@ add_subdirectory(tests) add_subdirectory(examples) add_subdirectory(mega-unit) -add_library(bkc STATIC all.c) +add_library(bkcgen STATIC all.c) include(CTest) add_test(NAME BNLeftRotate COMMAND bn_left_rotate_ut) @@ -152,4 +165,38 @@ add_test(NAME Q2M3Sort COMMAND q2m3sort_ut 10000) add_test(NAME HeapSort COMMAND heapsort_ut 10000) add_test(NAME GvecMemResize COMMAND gvec_mem_resize_ut) add_test(NAME GvecFill COMMAND gvec_fill_ut) -add_test(NAME GvecCreateFull COMMAND gvec_create_full_ut) \ No newline at end of file +add_test(NAME GvecCreateFull COMMAND gvec_create_full_ut) + +if (${CMAKE_BUILD_TYPE} STREQUAL Release) + set(cgraph_include_dest "include") + set(cgraph_lib_dest "lib") + set(MERGE_CMD ${CMAKE_CURRENT_BINARY_DIR}/mega-unit/merge) + execute_process(COMMAND ${MERGE_CMD} + ${CMAKE_CURRENT_SOURCE_DIR} all.h all.c bkcgen + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bkcgen.h DESTINATION "${cgraph_include_dest}") + install(TARGETS bkcgen DESTINATION "${cgraph_lib_dest}") + + set(CPACK_PACKAGE_INSTALL_DIRECTORY "/usr") + set(CPACK_GENERATOR "DEB") + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Nguyễn Bá Ngọc") + set(CPACK_DEBIAN_PACKAGE_DESCRIPTION + "Thư viện cấu trúc dữ liệu và giải thuật khái quát.") + set(CMAKE_PROJECT_HOMEPAGE_URL "https://github.com/bangoc/cgen") + set(CPACK_DEBIAN_PACKAGE_PRIORITY "standard") + set(CPACK_DEBIAN_PACKAGE_SECTION "devel") + + file (READ ${CMAKE_CURRENT_SOURCE_DIR}/VERSION CGEN_VERSION) + + # Set a Package Version + set(CPACK_PACKAGE_VERSION "${CGEN_VERSION}") + include(CPack) + + # To build a debian package + # cmake .. -DCMAKE_BUILD_TYPE=Release + # make -j 2 + # make package + # + # To install the debian package + # sudo dpkg -i package.deb +endif() \ No newline at end of file diff --git a/README.md b/README.md index 5bcd0d64..8a8d9c6e 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Tạo tệp CMakeLists.txt với các nội dung sau: add_subdirectory(cgen) include_directories(cgen) add_executable(prog main.c) -target_link_libraries(prog bkc) +target_link_libraries(prog bkcgen) ``` Nên thực hiện biên dịch dự án trong một thư mục độc lập, ví dụ: diff --git a/VERSION b/VERSION index 7dea76ed..8428158d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +1.1.2 \ No newline at end of file diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index bc78469f..b371f82b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(dll_songs dll_songs.c) add_executable(gtype_demo_io gtype_demo_io.c) foreach (p str_id s2i_pprint s2i_pprint_custom dll_songs) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() add_subdirectory(benchmarks) diff --git a/examples/OOP/CMakeLists.txt b/examples/OOP/CMakeLists.txt index ab2f064e..9b3cf52c 100644 --- a/examples/OOP/CMakeLists.txt +++ b/examples/OOP/CMakeLists.txt @@ -3,5 +3,5 @@ add_executable(SllG SllGDemo.c) add_executable(SllStr SllStr.c) foreach (p SllDemo SllG SllStr) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/benchmarks/rb/CMakeLists.txt b/examples/benchmarks/rb/CMakeLists.txt index 4058786c..8056b3d3 100644 --- a/examples/benchmarks/rb/CMakeLists.txt +++ b/examples/benchmarks/rb/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") add_executable(b123 bench_123.c) add_executable(b++123 bench_123.cc) -target_link_libraries(b123 bkc) +target_link_libraries(b123 bkcgen) # Người dùng tự bổ xung thư mục libfdr để biên dịch nếu quan tâm # có thể tài về ở địa chỉ https://github.com/bangoc/libfdr diff --git a/examples/benchmarks/sort/CMakeLists.txt b/examples/benchmarks/sort/CMakeLists.txt index f791e6cb..480f3a8e 100644 --- a/examples/benchmarks/sort/CMakeLists.txt +++ b/examples/benchmarks/sort/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(bench_sort bench_sort.c) -target_link_libraries(bench_sort bkc) +target_link_libraries(bench_sort bkcgen) if (BENCH_OP) add_executable(generator generator.c) diff --git a/examples/deb/system_gvec_demo.c b/examples/deb/system_gvec_demo.c new file mode 100644 index 00000000..12ca4310 --- /dev/null +++ b/examples/deb/system_gvec_demo.c @@ -0,0 +1,21 @@ +/* (C) Nguyễn Bá Ngọc 2022 */ + +/** @file + * @brief Minh họa kịch bản sử dụng thư viện cgen sau khi cài như thư viện tiêu chuẩn. + * Có thể biên dịch chương trình với lệnh: + * gcc -o prog system_gvec_demo.c -lbkcgen + */ + +#include + +#include + +int main() { + struct gvector *v = gvec_create(0, NULL); + gvec_append(v, gtype_l(1)); + gvec_append(v, gtype_l(3)); + gvec_append(v, gtype_l(5)); + gvec_pprint(v, gtype_print_l); + gvec_free(v); + return 0; +} \ No newline at end of file diff --git a/examples/gsl/CMakeLists.txt b/examples/gsl/CMakeLists.txt index f9f899db..60960fb6 100644 --- a/examples/gsl/CMakeLists.txt +++ b/examples/gsl/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(gsl_demo gsl_demo.c) foreach (p gsl_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/gtype/CMakeLists.txt b/examples/gtype/CMakeLists.txt index dc7429df..d8c035a5 100644 --- a/examples/gtype/CMakeLists.txt +++ b/examples/gtype/CMakeLists.txt @@ -1,4 +1,4 @@ add_executable(gtype_demo gtype_demo.c) foreach (p gtype_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/gvec/CMakeLists.txt b/examples/gvec/CMakeLists.txt index 6d4538f3..ce07b2d4 100644 --- a/examples/gvec/CMakeLists.txt +++ b/examples/gvec/CMakeLists.txt @@ -6,5 +6,5 @@ add_executable(gvec_clear_demo gvec_clear_demo.c) foreach (p gvec_demo gvec_i_demo gvec_s_demo gvec_pp_demo gvec_clear_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/hfunc/CMakeLists.txt b/examples/hfunc/CMakeLists.txt index d11391e5..45ed5b38 100644 --- a/examples/hfunc/CMakeLists.txt +++ b/examples/hfunc/CMakeLists.txt @@ -1,3 +1,3 @@ add_executable(hgen_demo hgen_demo.c) -target_link_libraries(hgen_demo bkc) \ No newline at end of file +target_link_libraries(hgen_demo bkcgen) \ No newline at end of file diff --git a/examples/hmap/CMakeLists.txt b/examples/hmap/CMakeLists.txt index 51566bf0..3f21a1dd 100644 --- a/examples/hmap/CMakeLists.txt +++ b/examples/hmap/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(hmap_demo hmap_demo.c) add_executable(hmap_clear_demo hmap_clear_demo.c) foreach (p hmap_demo hmap_clear_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/hset/CMakeLists.txt b/examples/hset/CMakeLists.txt index 01d675f7..e0b247a0 100644 --- a/examples/hset/CMakeLists.txt +++ b/examples/hset/CMakeLists.txt @@ -2,5 +2,5 @@ add_executable(hset_demo hset_demo.c) add_executable(hset_clear_demo hset_clear_demo.c) foreach (p hset_demo hset_clear_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/p1w/CMakeLists.txt b/examples/p1w/CMakeLists.txt index bccbb657..1fc5b245 100644 --- a/examples/p1w/CMakeLists.txt +++ b/examples/p1w/CMakeLists.txt @@ -3,5 +3,5 @@ add_executable(p1wi_root p1wi_root.c) add_executable(p1wi_clear_demo p1wi_clear_demo.c) foreach (p p1wi_demo p1wi_root p1wi_clear_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/rbm/CMakeLists.txt b/examples/rbm/CMakeLists.txt index 7e52be5c..eae52aee 100644 --- a/examples/rbm/CMakeLists.txt +++ b/examples/rbm/CMakeLists.txt @@ -3,5 +3,5 @@ add_executable(rbm_rgb_rand_demo rbm_rgb_rand_demo.c) add_executable(rbm_tf_cf_demo rbm_tf_cf_demo.c) add_executable(rbm_clear_demo rbm_clear_demo.c) foreach (p rbm_si_demo rbm_rgb_rand_demo rbm_tf_cf_demo rbm_clear_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/examples/rbs/CMakeLists.txt b/examples/rbs/CMakeLists.txt index 8f3e8ce8..26dc6a02 100644 --- a/examples/rbs/CMakeLists.txt +++ b/examples/rbs/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(rbs_demo rbs_demo.c) add_executable(rbs_clear_demo rbs_clear_demo.c) foreach (p rbs_demo rbs_clear_demo) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/mega-unit/CMakeLists.txt b/mega-unit/CMakeLists.txt index 8bfb6871..33abc09f 100644 --- a/mega-unit/CMakeLists.txt +++ b/mega-unit/CMakeLists.txt @@ -1,2 +1,2 @@ add_executable(merge merge.c) -target_link_libraries(merge bkc) \ No newline at end of file +target_link_libraries(merge bkcgen) \ No newline at end of file diff --git a/tests/bn/CMakeLists.txt b/tests/bn/CMakeLists.txt index 97f0a581..d2df96c8 100644 --- a/tests/bn/CMakeLists.txt +++ b/tests/bn/CMakeLists.txt @@ -11,5 +11,5 @@ foreach(p bn_most_ut bn_transplant_ut bn_foreach_ut bn_similar_tree_ut bn_edge_height_ut bn_insert_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/bs/CMakeLists.txt b/tests/bs/CMakeLists.txt index fe88fffd..3d7af2c7 100644 --- a/tests/bs/CMakeLists.txt +++ b/tests/bs/CMakeLists.txt @@ -8,5 +8,5 @@ add_executable(bs_search_lte_gte_g_ut bs_search_lte_gte_g_ut.c) foreach (p bs_search_ut bs_search_lte_ut bs_search_gte_ut bs_search_lte_gte_1k_ut bs_gtype_i_ut bs_search_lte_gte_g_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/dll/CMakeLists.txt b/tests/dll/CMakeLists.txt index 3adb1dd5..a5aec349 100644 --- a/tests/dll/CMakeLists.txt +++ b/tests/dll/CMakeLists.txt @@ -3,5 +3,5 @@ add_executable(dll_int_ut dll_int_ut.c) add_executable(dll_gtype_ut dll_gtype_ut.c) foreach (p dll_generic_ut dll_int_ut dll_gtype_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/gsl/CMakeLists.txt b/tests/gsl/CMakeLists.txt index 8a78fb40..4efe686b 100644 --- a/tests/gsl/CMakeLists.txt +++ b/tests/gsl/CMakeLists.txt @@ -1,4 +1,4 @@ add_executable(gsl_inserta_ut gsl_inserta_ut.c) foreach (p gsl_inserta_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/gttreemap/CMakeLists.txt b/tests/gttreemap/CMakeLists.txt index be744116..86710c02 100644 --- a/tests/gttreemap/CMakeLists.txt +++ b/tests/gttreemap/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(gt_treemap_ut gt_treemap_ut.c) foreach(p gt_treemap_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/gvec/CMakeLists.txt b/tests/gvec/CMakeLists.txt index ab35672a..4842326a 100644 --- a/tests/gvec/CMakeLists.txt +++ b/tests/gvec/CMakeLists.txt @@ -9,5 +9,5 @@ add_executable(gvec_create_full_ut gvec_create_full_ut.c) foreach (p gvec_ut gvec_v_ut gvec_selsort_ut gvec_insort_ut gvec_bubsort_ut gvec_mem_resize_ut gvec_fill_ut gvec_create_full_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/hmap/CMakeLists.txt b/tests/hmap/CMakeLists.txt index 2ec95af1..3a0117ff 100644 --- a/tests/hmap/CMakeLists.txt +++ b/tests/hmap/CMakeLists.txt @@ -7,5 +7,5 @@ add_executable(hmap_hmap_ut hmap_hmap_ut.c) add_executable(hmap_put_si_ut hmap_put_si_ut.c) foreach (p hmap_small_ut hmap_nnode_ut hmap_randi_ut hmap_free0_ut hmap_gvec_ut hmap_hmap_ut hmap_put_si_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/hset/CMakeLists.txt b/tests/hset/CMakeLists.txt index 74c9caf9..d92ef459 100644 --- a/tests/hset/CMakeLists.txt +++ b/tests/hset/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(hset_ut hset_ut.c) add_executable(hset_rand_ut hset_rand_ut.c) foreach(p hset_ut hset_rand_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/p1w/CMakeLists.txt b/tests/p1w/CMakeLists.txt index 40a85286..870ec64f 100644 --- a/tests/p1w/CMakeLists.txt +++ b/tests/p1w/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(p1w_ut p1w_ut.c) foreach (p p1w_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/p2w/CMakeLists.txt b/tests/p2w/CMakeLists.txt index 041e5e4b..5bbf3f62 100644 --- a/tests/p2w/CMakeLists.txt +++ b/tests/p2w/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(d2wheap_ut d2wheap_ut.c) add_executable(gtp2wheap_ut gtp2wheap_ut.c) foreach(p d2wheap_ut gtp2wheap_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/que/CMakeLists.txt b/tests/que/CMakeLists.txt index 276377da..0ccdc2e4 100644 --- a/tests/que/CMakeLists.txt +++ b/tests/que/CMakeLists.txt @@ -1,4 +1,4 @@ add_executable(que_simple_ut que_simple_ut.c) foreach (p que_simple_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/rb/CMakeLists.txt b/tests/rb/CMakeLists.txt index a05ccd2c..7142dcde 100644 --- a/tests/rb/CMakeLists.txt +++ b/tests/rb/CMakeLists.txt @@ -13,5 +13,5 @@ foreach (p bn_left_rotate_ut rb_insert_delete_ut rb_build_ut rb_delete_ut rb_delete_similar_ut rb_is_valid_ut rb_insert_delete_1k_ut rb_rand_insert_delete_ut rb_insert_delete_duplicates_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/rbm/CMakeLists.txt b/tests/rbm/CMakeLists.txt index 53b9c7f9..12d6396d 100644 --- a/tests/rbm/CMakeLists.txt +++ b/tests/rbm/CMakeLists.txt @@ -4,5 +4,5 @@ add_executable(rbm_hmap_ut rbm_hmap_ut.c) add_executable(rbm_put_si_ut rbm_put_si_ut.c) foreach (p rbm_rand_i_ut rbm_gvec_ut rbm_hmap_ut rbm_put_si_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/rbs/CMakeLists.txt b/tests/rbs/CMakeLists.txt index b2054969..2d1baef5 100644 --- a/tests/rbs/CMakeLists.txt +++ b/tests/rbs/CMakeLists.txt @@ -3,5 +3,5 @@ add_executable(rbs_str_ut rbs_str_ut.c) add_executable(rbs_rand_ut rbs_rand_ut.c) foreach (p rbs_i_ut rbs_str_ut rbs_rand_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/s2i/CMakeLists.txt b/tests/s2i/CMakeLists.txt index 42920815..5d008524 100644 --- a/tests/s2i/CMakeLists.txt +++ b/tests/s2i/CMakeLists.txt @@ -4,5 +4,5 @@ add_executable(s2i_insert_dup_ut s2i_insert_dup_ut.c) add_executable(s2i_set_dup_ut s2i_set_dup_ut.c) foreach(p s2i_ut s2i_ut2 s2i_insert_dup_ut s2i_set_dup_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/s2w/CMakeLists.txt b/tests/s2w/CMakeLists.txt index 4dc3d36f..79192b31 100644 --- a/tests/s2w/CMakeLists.txt +++ b/tests/s2w/CMakeLists.txt @@ -1,4 +1,4 @@ add_executable(s2w_ut s2w_ut.c) foreach (p s2w_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/sll/CMakeLists.txt b/tests/sll/CMakeLists.txt index 0b5d993f..fe46364f 100644 --- a/tests/sll/CMakeLists.txt +++ b/tests/sll/CMakeLists.txt @@ -4,5 +4,5 @@ add_executable(sll_l_queue_ut sll_l_queue_ut.c) add_executable(sll_l_stack_ut sll_l_stack_ut.c) foreach (p sll_ut sll_g_ut sll_l_queue_ut sll_l_stack_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/sort/CMakeLists.txt b/tests/sort/CMakeLists.txt index 83c4c490..11825b34 100644 --- a/tests/sort/CMakeLists.txt +++ b/tests/sort/CMakeLists.txt @@ -7,5 +7,5 @@ add_executable(heapsort_ut heapsort_ut.c) foreach (p q2sort_ut q2m3sort_ut q3sort_ut quicksort_ut sort_all_identical_ut heapsort_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/stk/CMakeLists.txt b/tests/stk/CMakeLists.txt index 89eef957..772cc70e 100644 --- a/tests/stk/CMakeLists.txt +++ b/tests/stk/CMakeLists.txt @@ -1,4 +1,4 @@ add_executable(stk_simple_ut stk_simple_ut.c) foreach (p stk_simple_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file diff --git a/tests/str/CMakeLists.txt b/tests/str/CMakeLists.txt index abed6d2e..679d9782 100644 --- a/tests/str/CMakeLists.txt +++ b/tests/str/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(spaces_ut spaces_ut.c) add_executable(split_ut split_ut.c) foreach (p spaces_ut split_ut) - target_link_libraries(${p} bkc) + target_link_libraries(${p} bkcgen) endforeach() \ No newline at end of file