BatchDrake / sigutils

Small signal processing utility library
https://batchdrake.github.io/sigutils
GNU General Public License v3.0
76 stars 29 forks source link

Remove ugly CMake hack #48

Closed antoniovazquezblanco closed 1 year ago

antoniovazquezblanco commented 1 year ago

Sorry, it had to go sooner or later...

See: https://discourse.cmake.org/t/cmake-file-name-in-a-portable-way/6918

The hack was not portable. That means that only worked with Makefiles as the CMake backend. That means that Ninja backend cannot be used. That means that MSYS will probably won't accept a PR with this package (https://github.com/msys2/MINGW-packages/pull/10543#issuecomment-1012312383). Therefore the hack is ugly...

I don't like embedding full paths in binaries for many reasons. I've tryed to avoid that by using the new __FILE_NAME__ macro available in GCC 12 and newer. If not available, the full path is used...

antoniovazquezblanco commented 1 year ago

This is gold. Old hack removed but alternatively implemented with proper CMake commands.

BatchDrake commented 1 year ago

Amazing work, dude! Merging right away