File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ if(${LIBVSYNC_ENABLE_TESTS})
107107 add_subdirectory (template )
108108 add_subdirectory (test )
109109 add_subdirectory (verify )
110+ add_subdirectory (examples )
110111 if (LIBVSYNC_ADDRESS_SANITIZER)
111112 target_compile_options (vsync INTERFACE -fsanitize=address )
112113 target_compile_definitions (vsync INTERFACE VSYNC_ADDRESS_SANITIZER )
Original file line number Diff line number Diff line change 11file (GLOB EXAMPLES eg_*.c )
22
3- add_custom_target (test_example )
3+ # exclude examples that rely on unreleased algos.
4+ set (EXCLUDE_LIST
5+ eg_hashtable_evictable #
6+ eg_hashtable_standard #
7+ eg_listset_coarse #
8+ eg_listset_fine #
9+ eg_listset_lazy #
10+ eg_listset_lf #
11+ eg_listset_opt #
12+ eg_queue_prio_skiplist #
13+ eg_queue_prio_stack_array #
14+ eg_queue_prio_stack_tree #
15+ eg_skiplist_lf #
16+ eg_stack_elimination #
17+ eg_stack_xbo #
18+ eg_taslock # TODO release
19+ eg_unbounded_queue_lf #
20+ )
21+
22+ set (EXAMPLES_BUILD_TARGET examples)
23+ add_custom_target (${EXAMPLES_BUILD_TARGET} )
424# compile each c file in examples folder
5- foreach (example IN ITEMS ${EXAMPLES} )
6- get_filename_component (EXAMPLE ${example} NAME_WE )
7- add_executable (${EXAMPLE} ${example} )
25+ foreach (EG IN ITEMS ${EXAMPLES} )
26+ get_filename_component (EXAMPLE ${EG} NAME_WE )
27+ if (EXAMPLE IN_LIST EXCLUDE_LIST)
28+ continue ()
29+ endif ()
30+ add_executable (${EXAMPLE} ${EG} )
831 # you should not add additional libs here
932 target_link_libraries (${EXAMPLE} vsync pthread )
10- add_dependencies (test_example ${EXAMPLE} )
33+ add_dependencies (${EXAMPLES_BUILD_TARGET} ${EXAMPLE} )
1134 # add it as a test
1235 add_test (NAME ${EXAMPLE} COMMAND ${EXAMPLE} )
1336endforeach ()
Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) Huawei Technologies Co., Ltd. 2025. All rights reserved.
2+ * Copyright (C) Huawei Technologies Co., Ltd. 2025-2026 . All rights reserved.
33 * SPDX-License-Identifier: MIT
44 */
55
Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) Huawei Technologies Co., Ltd. 2023- 2025. All rights reserved.
3- * Author: Huawei Dresden Research Center
2+ * Copyright (C) Huawei Technologies Co., Ltd. 2025. All rights reserved.
3+ * SPDX-License-Identifier: MIT
44 */
5+
56#ifndef VDOC_H
67#define VDOC_H
78/*******************************************************************************
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) Huawei Technologies Co., Ltd. 2023-2024 . All rights reserved.
2+ * Copyright (C) Huawei Technologies Co., Ltd. 2023-2026 . All rights reserved.
33 * SPDX-License-Identifier: MIT
44 */
55
Original file line number Diff line number Diff line change 11/*
2- * Copyright (C) Huawei Technologies Co., Ltd. 2023-2025 . All rights reserved.
2+ * Copyright (C) Huawei Technologies Co., Ltd. 2023-2026 . All rights reserved.
33 * SPDX-License-Identifier: MIT
44 */
55
You can’t perform that action at this time.
0 commit comments