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
Fix symlink install versioned shared library #216
Conversation
Signed-off-by: JafarAbdi <cafer.abdi@gmail.com>
b6c8a6b
to
38c4eb2
Compare
Please see my comment on the original ticket about a simple wildcard to be marching to broadly. Instead use a now specific regex to only capture the intended version suffices. |
@dirk-thomas Sorry for the delay again does the following regex ok .? EDIT: Found a better one |
You can simplify your regex without allowing an arbitrary amount of version parts (e.g. |
If we don't want to allow multiple .#, then how about |
@dirk-thomas CMake regex doesn't support curly brackets see |
It should only pass the following extensions |
Gotcha. In that case, without curly braces support I think your initial solution works best. |
Example with the last updated regex cmake_minimum_required(VERSION 3.1.3)
project(testing_project)
set(exts
".so.1100"
".so.1.2.4"
".so.10.2.4"
".so.1.20.4"
".so.1.2.40"
".so.2.1"
".so.2.1.2.1.2"
".sos.2"
".sos"
".so"
".so.1"
".so.2.0.0"
".so.1.s"
"sso.1.s"
".so.s.1"
".so.1.2.s"
)
foreach(ext ${exts})
if(ext MATCHES "\.so(\.[0-9]+)?(\.[0-9]+)?(\.[0-9]+)?$")
message("Pass: ${ext}")
else()
message("Fail: ${ext}")
endif()
endforeach() The output
|
Signed-off-by: JafarAbdi <cafer.abdi@gmail.com>
d453a4e
to
8e74da9
Compare
Why the |
ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install.cmake.in
Show resolved
Hide resolved
Unfortunately the PR testing for Foxy isn't working yet. You can ignore that status. I will trigger a set of manual CI builds once the patch is ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvement.
I'm locally getting errors like:
Though I don't see that in the CI logs. |
@ivanpauno Does replacing it with |
Yeah, I've tried same error. |
@ivanpauno Could you please share the instruction to reproduce it .? |
See #217 for the fix. |
As the output above shows the CMake warning appears when building the |
* Fix symlink install versioned shared library Signed-off-by: JafarAbdi <cafer.abdi@gmail.com> * Update ament_cmake_symlink_install.cmake.in Signed-off-by: JafarAbdi <cafer.abdi@gmail.com>
* Fix symlink install versioned shared library Signed-off-by: JafarAbdi <cafer.abdi@gmail.com> * Update ament_cmake_symlink_install.cmake.in Signed-off-by: JafarAbdi <cafer.abdi@gmail.com> Signed-off-by: Steve Peters <scpeters@openrobotics.org>
* Fix symlink install versioned shared library Signed-off-by: JafarAbdi <cafer.abdi@gmail.com> * Update ament_cmake_symlink_install.cmake.in Signed-off-by: JafarAbdi <cafer.abdi@gmail.com>
* Fix symlink install versioned shared library Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com> * Update ament_cmake_symlink_install.cmake.in Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com>
* Fix symlink install versioned shared library Signed-off-by: JafarAbdi <cafer.abdi@gmail.com> * Update ament_cmake_symlink_install.cmake.in Signed-off-by: JafarAbdi <cafer.abdi@gmail.com> Signed-off-by: Steve Peters <scpeters@openrobotics.org>
) (#217) (#310) * Fix symlink install versioned shared library (#216) * Fix symlink install versioned shared library Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com> * Update ament_cmake_symlink_install.cmake.in Signed-off-by: Jafar Abdi <cafer.abdi@gmail.com> * fix escaping of regex (#217) Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com> Co-authored-by: Jafar Abdi <cafer.abdi@gmail.com> Co-authored-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Fix #214
From doing some online research I found that the versioning extension is just for shared libraries in Linux so the other checks don't need any change