diff options
| author | ruki <[email protected]> | 2019-07-01 22:35:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-07-01 09:35:01 +0800 |
| commit | a40920e82e60b7a87731ba60b848b9bafa8cf937 (patch) | |
| tree | 772b961a8ac0c107142ae0f743b73b332afa2140 /tests/projects/c++ | |
| parent | ff067fda68bf431a4d46ce0149d425c7665aa2e7 (diff) | |
add protobuf rules
Diffstat (limited to 'tests/projects/c++')
| -rw-r--r-- | tests/projects/c++/protobuf/src/main.cpp | 1 | ||||
| -rw-r--r-- | tests/projects/c++/protobuf/xmake.lua | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/projects/c++/protobuf/src/main.cpp b/tests/projects/c++/protobuf/src/main.cpp index db2361659..1e7830c17 100644 --- a/tests/projects/c++/protobuf/src/main.cpp +++ b/tests/projects/c++/protobuf/src/main.cpp @@ -1,4 +1,5 @@ #include <iostream> +#include "test.pb.h" using namespace std; diff --git a/tests/projects/c++/protobuf/xmake.lua b/tests/projects/c++/protobuf/xmake.lua index b340a8cd4..da8f1ee16 100644 --- a/tests/projects/c++/protobuf/xmake.lua +++ b/tests/projects/c++/protobuf/xmake.lua @@ -3,7 +3,7 @@ add_rules("mode.debug", "mode.release") -- add protobuf -add_requires("protobuf-cpp", "protoc") +add_requires("protobuf-cpp") -- add target target("console_c++") @@ -11,10 +11,13 @@ target("console_c++") -- set kind set_kind("binary") - -- add rules and packages - add_rules("protobuf.cpp") - add_packages("protobuf-cpp", "protoc") + -- set languages + set_languages("c++11") + + -- add packages + add_packages("protobuf-cpp") -- add files - add_files("src/*.cpp", "src/*.proto") + add_files("src/*.cpp") + add_files("src/*.proto", {rules = "protobuf.cpp"}) |
