-
Notifications
You must be signed in to change notification settings - Fork 370
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
Build fixes for OSL on Windows #1920
Build fixes for OSL on Windows #1920
Conversation
|
src/testshade/CMakeLists.txt
Outdated
@@ -2,6 +2,8 @@ | |||
# SPDX-License-Identifier: BSD-3-Clause | |||
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage | |||
|
|||
set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} "-std=c++17") |
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.
This one doesn't feel right. Shouldn't it use whatever standard is used by the rest of the codebase, instead of hard-coding it to 17?
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.
That sounds like a good request for an improvement to this change, and I'm CC'ing @krohmerNV for his thoughts.
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.
As an initial proposal for this improvement, perhaps it could be written as follows?
set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} -std=c++${CMAKE_CXX_STANDARD})
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.
I've made the change described above, and have verified that the OSL build for Windows works as before.
This changelist contains two fixes for OSL builds on the Windows platform, both of which were authored by Kai Rohmer at NVIDIA. Signed-off-by: Jonathan Stone <[email protected]>
As an update on the Contributor License Agreement, it sounds like Lucasfilm may not have contributed to OSL before, so it's going through the approval process now! |
set (LLVM_COMPILE_FLAGS ${LLVM_COMPILE_FLAGS} -std=c++${CMAKE_CXX_STANDARD}) | ||
|
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.
I ran into this as well, but there is actually a better solution!
I think my Windows CI PR is going to subsume this. I still think you should push the CLA through the bureaucracy so you've got the ducks in a row for the next time somebody from ILM needs to make an OSL patch. But I suspect this PR is ultimately not going to be merged. |
No problem, Larry, and a set of Windows fixes directly from the OSL team is even better from my perspective. I'll close out this PR, but will continue with the Lucasfilm approval process so that we can contribute in the future. |
Description
This changelist contains two fixes for OSL builds on the Windows platform, both of which were authored by Kai Rohmer at NVIDIA.
Tests
With these fixes in place, OSL builds on Windows now include
testshade
andtestrender
, where these two applications would previously fail to build.For visual validation, I'm attaching the latest MaterialX render comparisons between GLSL and OSL, where the OSL renders are using the codebase in OSL main plus these two fixes.
MaterialXRenderTests_01_07_2025_GitHub.pdf
Checklist:
already run clang-format v17 before submitting, I definitely will look at
the CI test that runs clang-format and fix anything that it highlights as
being nonconforming.