summaryrefslogtreecommitdiff
path: root/xmake/includes/check_cxxincludes.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-02-12 22:33:42 +0800
committerruki <[email protected]>2019-02-12 09:22:17 +0800
commitd7194331ea134b0e1b54a5e09a59824b9c399d83 (patch)
treeac95a37d84e5b489a2a619d1b393283bfa1a6c52 /xmake/includes/check_cxxincludes.lua
parent25bd4311c541cbf6329b8a309d8d47ceeaee5184 (diff)
improve diagnosis info
Diffstat (limited to 'xmake/includes/check_cxxincludes.lua')
-rw-r--r--xmake/includes/check_cxxincludes.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/includes/check_cxxincludes.lua b/xmake/includes/check_cxxincludes.lua
index e2e6627b6..f1f63ea2e 100644
--- a/xmake/includes/check_cxxincludes.lua
+++ b/xmake/includes/check_cxxincludes.lua
@@ -31,11 +31,12 @@
--
function check_cxxincludes(definition, includes, opt)
opt = opt or {}
- option(opt.name or definition)
+ local optname = "__" .. (opt.name or definition)
+ option(optname)
add_cxxincludes(includes)
add_defines(definition)
option_end()
- add_options(opt.name or definition)
+ add_options(optname)
end
-- check include c++ files and add macro definition to the configuration files
@@ -47,9 +48,10 @@ end
--
function configvar_check_cxxincludes(definition, includes, opt)
opt = opt or {}
- option(opt.name or definition)
+ local optname = "__" .. (opt.name or definition)
+ option(optname)
add_cxxincludes(includes)
set_configvar(definition, 1)
option_end()
- add_options(opt.name or definition)
+ add_options(optname)
end