Replies: 1 comment 3 replies
-
Use clang-cl? Otherwise you might always encounter some cmake dependency adding build flags the wrong way. OpenEXR should probably do a better compiler check when adding those flags and use a generator expression to disable it. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I've been building some of my projects on windows-x64 with clang, while installing vcpkg packages using default toolchain (which is msvc). But now I've encountered an issue with one of the dependencies (OpenImageIO, and in particular its dependency OpenEXR), which manually adds
\EHsc
flag to cmake and makes my own targets also include it resulting in build failure (clang doesn't understand msvc-styled flags). An example of this can be seen in this issue: #34926.The proposed solution (#38030) is to build the dependencies with clang also. My question: was I doing it wrong all this time? Is cross-toolchain library linking a bad practice with possibly other problems I'm not aware of, or is it just on per-library basis hurdles like this one with the flag (i.e. if we it compiles, we're good)? Also, if it is the latter - is there a better way for library providers to add compilation flags without breaking builds on foreign toolchain consumers?
Beta Was this translation helpful? Give feedback.
All reactions