fix xmake macro

This commit is contained in:
方而静 2023-08-28 23:21:42 +08:00
parent c6bed88d37
commit db6c6cc7aa
Signed by: szTom
GPG Key ID: 072D999D60C6473C
2 changed files with 6 additions and 2 deletions

View File

@ -824,13 +824,16 @@ void work() {
}
int main(int argc, char* argv[]) {
#define AS_STR(x) #x
argparse::ArgumentParser program("acpa",
APP_VERSION,
AS_STR(APP_VERSION),
argparse::default_arguments::help,
false);
program.add_argument("input_file")
.help("Source proof file")
.action([](const std::string& value) { return value; });
try {
program.parse_args(argc, argv);
} catch (const std::runtime_error& err) {
@ -847,3 +850,4 @@ int main(int argc, char* argv[]) {
work();
return 0;
}

View File

@ -14,7 +14,7 @@ target("build")
add_files("src/**.cpp")
-- add_includedirs("include/")
add_includedirs("third-party/")
add_defines("APP_VERSION=\"" .. app_version .. "\"")
add_defines("APP_VERSION=" .. app_version)
if is_mode("release") then
set_strip("all")
set_optimize("faster")