apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
301 stars 54 forks source link

Drafter version does not work for CMake builds #775

Closed kylef closed 4 years ago

kylef commented 4 years ago

When building with CMake, the version is returned as "Non-oficial drafter gyp-based build", which is incorrect.

$ ./src/drafter --version
Non-oficial drafter gyp-based build

It would look like the code here is incorrect, and designed so that it checks for the presence of a macro CMAKE_BUILD_TYPE, which I don't think is ever set and thus always returns GYP version.

https://github.com/apiaryio/drafter/blob/32f5f873b9cf38cad30b2d07fa41aa4d5a8f1d39/src/drafter.cc#L234