配置成debug规则却还是编译为release #2090
Answered
by
xq114
MichaelWU0726
asked this question in
Q&A
-
配置文件声明了debug: add_rules("mode.debug")
set_policy("package.requires_lock", true)
add_requires("openssl 1.1.1k", {debug=true})
target("hello")
set_kind("binary")
add_files("src/*.cpp")
add_packages("openssl 1.1.1k")
set_toolset("cxx", "/usr/bin/g++") 却还是编译成了release: $ xmake
checking for platform ... linux
checking for architecture ... x86_64
updating repositories .. ok
note: install or modify (m) these packages (pass -y to skip confirm)?
in xmake-repo:
-> openssl 1.1.1k [debug:y]
please input: y (y/n/m)
=> download https://hub.fastgit.xyz/openssl/openssl/archive/OpenSSL_1_1_1k.zip .. ok
=> install openssl 1.1.1k .. ok
[ 25%]: compiling.release src/main.cpp
[ 50%]: linking.release hello
[100%]: build ok! |
Beta Was this translation helpful? Give feedback.
Answered by
xq114
Feb 25, 2022
Replies: 3 comments 13 replies
-
add_rules("mode.release", "mode.debug") 这种只是配置声明,你当前的 targets 可以应用的 mode ,具体生效哪个,要自己根据 |
Beta Was this translation helpful? Give feedback.
7 replies
-
这个只是切换配置哈,xmake f/config 你配置切到 debug 模式,得执行 xmake f -m debug
xmake |
Beta Was this translation helpful? Give feedback.
5 replies
-
https://xmake.io/#/manual/global_interfaces?id=set_defaultmode 试试这个 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
MichaelWU0726
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://xmake.io/#/manual/global_interfaces?id=set_defaultmode
试试这个