summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-17 00:40:40 +0800
committerruki <[email protected]>2022-09-17 00:40:40 +0800
commit0a5c71801f41f55ebe7c0242eefee936756fbbd9 (patch)
tree022cd593348744fcc965c3bc599d4ec2d078c5fc
parentaeda19b4032f790aa6e6915752ae5f06850ad56a (diff)
format code
-rw-r--r--tests/projects/package/vcpkg/xmake.lua2
-rw-r--r--xmake/modules/detect/tools/find_cpp.lua10
-rw-r--r--xmake/modules/detect/tools/find_gxx.lua7
3 files changed, 2 insertions, 17 deletions
diff --git a/tests/projects/package/vcpkg/xmake.lua b/tests/projects/package/vcpkg/xmake.lua
index 3f5dbcf55..7a51115ed 100644
--- a/tests/projects/package/vcpkg/xmake.lua
+++ b/tests/projects/package/vcpkg/xmake.lua
@@ -1,5 +1,5 @@
add_requires("vcpkg::zlib", "vcpkg::pcre2")
-add_requires("vcpkg::boost[core]", {alias = "boost"})
+--add_requires("vcpkg::boost[core]", {alias = "boost"})
target("test")
set_kind("binary")
diff --git a/xmake/modules/detect/tools/find_cpp.lua b/xmake/modules/detect/tools/find_cpp.lua
index e80bfb4e4..9d87c0ebd 100644
--- a/xmake/modules/detect/tools/find_cpp.lua
+++ b/xmake/modules/detect/tools/find_cpp.lua
@@ -36,19 +36,11 @@ import("lib.detect.find_programver")
-- @endcode
--
function main(opt)
-
- -- init options
opt = opt or {}
-
- -- find program
- local program = find_program(opt.program or "cpp", opt)
-
- -- find program version
local version = nil
+ local program = find_program(opt.program or "cpp", opt)
if program and opt and opt.version then
version = find_programver(program, opt)
end
-
- -- ok?
return program, version
end
diff --git a/xmake/modules/detect/tools/find_gxx.lua b/xmake/modules/detect/tools/find_gxx.lua
index 727d1925d..b5537e5b3 100644
--- a/xmake/modules/detect/tools/find_gxx.lua
+++ b/xmake/modules/detect/tools/find_gxx.lua
@@ -37,13 +37,8 @@ import("lib.detect.find_programver")
--
function main(opt)
- -- init options
opt = opt or {}
-
- -- find program
local program = find_program(opt.program or "g++", opt)
-
- -- find program version
local version = nil
if program and opt and opt.version then
version = find_programver(program, opt)
@@ -57,7 +52,5 @@ function main(opt)
is_clang = true
end
end
-
- -- ok?
return program, version, (is_clang and "clangxx" or "gxx")
end