-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
opencv 4.x: honor dynamic runtime from conan profile when compiler is clang-cl #24071
opencv 4.x: honor dynamic runtime from conan profile when compiler is clang-cl #24071
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hooks produced the following warnings for commit bc01d0bopencv/4.9.0@#0e6e307ff1ed2e12e623c2e72a3214de
opencv/4.5.5@#8dd0345982066b80c1b279106dee329a
opencv/4.8.1@#c786879d407ea7a371081ee7e87f66bb
opencv/4.1.2@#845e76a4ed264a974308672169d8568e
opencv/4.5.3@#da3d82851686a2d09d28f9063a7b5310
|
I was trying to compile opencv with and without the changes here with clang-cl on windows but the build keeps getting stuck at:
Was this your experience @SpaceIm? Any clue what's happening here? Thank you! |
No idea, I've just fixed the most obvious issue reported by #24056 (dynamic runtime not honored if clang-cl), but not tested myself since I'm not on Windows currently. I don't know why it's stuck now (I guess when @Jimbopython Do you have a better luck? |
Conan v1 pipeline ✔️All green in build 3 (
Conan v2 pipeline ✔️
All green in build 3 ( |
I will take a look next week if the changes fix my issue. I had the issue from @danimtb as well, when building with clang-cl 17. |
I just checked it and the fix works with clang-cl 16. Note that the hanging of clang-cl 17 is known and already fixed in a newer version: |
May I ask to conan folks maintaining conancenter to push for adding these helpers to conan API? I've opened conan-io/conan#12336 long time ago, and I don't have the time to argue more. |
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 double checking @Jimbopython :)
closes #24056
is_msvc()
andis_msvc_static_runtime()
helpers don't understand clang-cl profiles (os=Windows, compiler=clang, compiler.runtime defined). They are too specific and not a proper mapping with the meaning ofMSVC
variable in CMake (MSVC
is TRUE in CMake for any cl like compiler).In opencv, runtime is changed through a CMake option which must be passed by the recipe, so opencv recipe must pass compiler.runtime if it is defined, irrespective of compiler.