Check that we parsed all version components and avoid doing 2 regex matches for every component when we can just use CMAKE_MATCH_1 directly.
@MaartenBent This is very minor, but I was just implementing something similar in my own code and I was wondering why did wx do it in the more complicated way. I couldn't find any answer (CMAKE_MATCH_1 seems to be available since always), so I've decided to change it and ask you if you see anything wrong with it, so that I could fix my own code if necessary. And if not, I think this is slightly better, isn't it?
https://github.com/wxWidgets/wxWidgets/pull/26382
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I don't know why, it has been there since CMake support was added.
Personally I would use a macro instead of a function, and then get rid of PARENT_SCOPE.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, I'll change it to the macro — I tend to avoid them for hygienic reasons, but you're right that it should probably be fine for such a simple case.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Applied in the commit above.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()