Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have tried setting the debug flags using the

set

command in cmake but I cam unsure what to add. I have been told things like DEBUG=true but so far i am unable to find the correct flag to set.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
508 views
Welcome To Ask or Share your Answers For Others

1 Answer

If you want to build for debug (including source information, i.e. -g) when compiling, use

cmake -DCMAKE_BUILD_TYPE=Debug <path>

If you want to build a release build, you can use

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo <path>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...