Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Sep 23, 2021
1 parent b97aff5 commit 6708849
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/apis/add_configfiles/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ ${define FOO_DEFINE}
${define FOO2_ENABLE}
${define FOO2_ENABLE2}
${define FOO2_STRING}

#define HAVE_SSE2 ${default HAVE_SSE2 0}
2 changes: 1 addition & 1 deletion tests/apis/check_xxx/config.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
${define HAS_STRING_H}
${define HAS_STRING_AND_STDIO_H}
${define HAS_WCHAR}
${define HAS_WCHAR_AND_FLOAT}
${define HAS_PTHREAD}
${define HAS_STATIC_ASSERT}
Expand All @@ -10,3 +9,4 @@ ${define HAS_CONSEXPR_AND_STATIC_ASSERT}
${define HAS_SSE2}
${define HAS_LONG_8}
${define PTR_SIZE}
#define HAS_WCHAR ${default HAS_WCHAR 0}
4 changes: 2 additions & 2 deletions xmake/core/project/target.lua
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ function _instance:orderopts(opt)

-- load options if be enabled
orderopts = {}
for _, name in ipairs(table.wrap(self:get("options"))) do
for _, name in ipairs(table.wrap(self:get("options", opt))) do
local opt_ = nil
if config.get(name) then opt_ = option.load(name) end
if opt_ then
Expand All @@ -738,7 +738,7 @@ function _instance:orderopts(opt)
end

-- load options from packages if no require info, be compatible with the option package in (*.pkg)
for _, name in ipairs(table.wrap(self:get("packages"))) do
for _, name in ipairs(table.wrap(self:get("packages", opt))) do
if not project_package.load(name) then
local opt_ = nil
if config.get(name) then opt_ = option.load(name) end
Expand Down

0 comments on commit 6708849

Please sign in to comment.