microsoft / ALEX

A library for building an in-memory, Adaptive Learned indEX
MIT License
662 stars 114 forks source link

Show the usage of build.sh in Debug Mode and define the macro DEBUG #14

Closed duanyang25 closed 3 years ago

duanyang25 commented 3 years ago

Hi there, I see the build.sh only tell CMake to compile in Debug Mode, and README does not show this usage. In addition to the update of README, I also define the macro DEBUG in CMakeLists.txt. I think this may be helpful for developers to debug.

ghost commented 3 years ago

CLA assistant check
All CLA requirements met.

jialinding commented 3 years ago

Thanks for the suggestion. Was the added DEBUG macro helpful for you in any particular way?

duanyang25 commented 3 years ago

Thanks for the suggestion. Was the added DEBUG macro helpful for you in any particular way?

With this macro, I do not need to delete codes that print out some information when I want to compile it in Release Mode since I can use "#ifdef DEBUG" and "#endif". I suggest this because I see there is Debug Mode in the build.sh, but I do not see any new feature in this mode. However, this is a very minor improvement and not important regarding the functionality of this project.

jialinding commented 3 years ago

Makes sense. A minor improvement is still good :)

As a side note, CMake automatically defines NDEBUG in Release mode, so you could use #ifndef NDEBUG to achieve the same result.