Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
301 stars 43 forks source link

Backtrace #510

Closed travankor closed 5 years ago

travankor commented 5 years ago

closes https://github.com/Attnam/ivan/issues/491

The current backtrace function is glibc-specific so it will only work on specific GNU/Linux and GNU/Hurd systems. This PR moves the glibc-specific backtrace to a compile-time flag.

I successfully compiled and played ivan on a musl libc Linux system with these patches.

jakwings commented 5 years ago

macos supports it since 10.5, can you add an cmake option and enable it by default on mac? (no version check needed)

jakwings commented 5 years ago

can also add an cmake option for wizard mode, so: -DWIZARD=ON -DBACKTRACE=ON

for -DBACKTRACE=ON, can first check if "execinfo.h" exists. Then leave the CXX_FLAGS for other workarounds.

travankor commented 5 years ago

to be honest, I've never written cmake files before. Any advice how to do this?

jakwings commented 5 years ago

It will take not a small amount of time to learn cmake, so I just pushed a few commits to your branch:

Please check if it still compiles well. Thanks~

travankor commented 5 years ago

yes, it still compiles

ryfactor commented 5 years ago

Is this ok to merge? @iology @AquariusPower ?? :)

jakwings commented 5 years ago

should be no problem.