Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ugly CMake hack #48

Merged
merged 1 commit into from
Apr 14, 2023

Conversation

antoniovazquezblanco
Copy link
Contributor

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 (msys2/MINGW-packages#10543 (comment)). 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...

Alternatively add a relative path __FILE__ macro definition module
@antoniovazquezblanco
Copy link
Contributor Author

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

@BatchDrake
Copy link
Owner

Amazing work, dude! Merging right away

@BatchDrake BatchDrake merged commit 33f450d into BatchDrake:develop Apr 14, 2023
6 checks passed
@antoniovazquezblanco antoniovazquezblanco deleted the dev/remove_hack branch April 14, 2023 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants