Fix compiler errors on Visual Studio 2022 & Add Support for CMake 4.0#316
Fix compiler errors on Visual Studio 2022 & Add Support for CMake 4.0#316hamedsabri wants to merge 2 commits intoAutodesk:devfrom
Conversation
hamedsabri
commented
Sep 20, 2025
- Add policy support for CMake 4.0
- Fix Compiler errors on Visual Studio 2022
- Fix Compiler errors on Visual Studio 2022
|
@hamedsabri Thanks for your interest in contributing to our repo MayaHydra, before we can accept PR from new contributor, we need you to fill, sign and email back to hydraformaya.contributor.agreements@autodesk.com the proper CLA (individual or corporate) from the link below: https://github.com/Autodesk/maya-hydra/blob/dev/doc/CONTRIBUTING.md |
Hi @lilike-adsk, I have signed/sent the CLA Individual agreement. Thanks |
lanierd-adsk
left a comment
There was a problem hiding this comment.
Thank you for your contribution !
|
I am assigning the PR to myself to run a preflight to check the changes. It only works with Autodesk employees. |
| @@ -1,4 +1,4 @@ | |||
| cmake_minimum_required(VERSION 3.12.0) | |||
| cmake_minimum_required(VERSION 3.5...4.0) | |||
There was a problem hiding this comment.
Hi Hamed, thanks for the PR! Was wondering, what's the reason for setting 3.5 as the minimum version, rather than 3.21 (which is our minimum as it is the first to support VS2022)?
There was a problem hiding this comment.
Hi @debloip-adsk
No particular reason since it only applies to building gtest itself and I didn't think would cause any issues. I can bump it to 3.21 if you prefer all subprojects match mayahydra minimum.
Also, I believe this entire Gtest stuff can be upgraded and simplified ( something for another day ).
There was a problem hiding this comment.
So long as this doesn't cause build issues I'm fine with it as well, we'll see with the preflight, sometimes the CMake versions can be a bit finicky
There was a problem hiding this comment.
Re-running Preflight to see if any issue
There was a problem hiding this comment.
@ppt-adsk it looks like the errors on Linux and MacOS only. Sorry, I won't be able to look into it for now since I don't have access to those platforms. Could be related
My company is Windows only:) I miss Linux!
|
Hi @hamedsabri, there were some build errors on the pre-flight. Any chance you can have a look at those? Thanks! |
|
re-run the preflight... |
|
Looks like gtest failed to be setup on Mac/Linux, @hamedsabri could we set the minimum version to 3.21 for cmake |