Skip to content

Commit 392deff

Browse files
committed
Update xmake.lua
1 parent e9f0560 commit 392deff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

insert-into-a-binary-search-tree/xmake.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
if is_mode("test") then add_requires("vcpkg::eventpp") end
12
set_policy("platform.longpaths", true)
23
add_repositories("masx200/xmake-repo https://gitee.com/masx200/xmake-repo.git");
34
add_repositories(
@@ -7,6 +8,13 @@ add_requires("leetcode-treenode-cpp 1.1.7");
78
add_requires("vcpkg::cppunit");
89
set_languages("c17", "cxx20");
910
target("insert-into-a-binary-search-tree-test");
11+
-- 如果当前编译模式是test
12+
if is_mode("test") then
13+
14+
-- 添加test编译宏
15+
add_defines("__TEST__")
16+
add_packages("vcpkg::eventpp")
17+
end
1018
set_group("test")
1119
set_default(false)
1220
set_kind("binary");

0 commit comments

Comments
 (0)