Skip to content

Fix compiler errors on Visual Studio 2022 & Add Support for CMake 4.0#316

Open
hamedsabri wants to merge 2 commits intoAutodesk:devfrom
hamedsabri:hsabri/fix_compiler_vs2022
Open

Fix compiler errors on Visual Studio 2022 & Add Support for CMake 4.0#316
hamedsabri wants to merge 2 commits intoAutodesk:devfrom
hamedsabri:hsabri/fix_compiler_vs2022

Conversation

@hamedsabri
Copy link
Copy Markdown
Contributor

  • Add policy support for CMake 4.0
  • Fix Compiler errors on Visual Studio 2022

- Fix Compiler errors on Visual Studio 2022
@lilike-adsk
Copy link
Copy Markdown
Collaborator

@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

@hamedsabri
Copy link
Copy Markdown
Contributor Author

@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

Copy link
Copy Markdown
Collaborator

@lanierd-adsk lanierd-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution !

@lanierd-adsk lanierd-adsk self-assigned this Sep 22, 2025
@lanierd-adsk
Copy link
Copy Markdown
Collaborator

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)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Collaborator

@lilike-adsk lilike-adsk Oct 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-running Preflight to see if any issue

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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!

@ppt-adsk
Copy link
Copy Markdown
Collaborator

Hi @hamedsabri, there were some build errors on the pre-flight. Any chance you can have a look at those? Thanks!

@lilike-adsk lilike-adsk assigned hamedsabri and unassigned hamedsabri Dec 10, 2025
@lilike-adsk
Copy link
Copy Markdown
Collaborator

re-run the preflight...

@lilike-adsk
Copy link
Copy Markdown
Collaborator

Looks like gtest failed to be setup on Mac/Linux, @hamedsabri could we set the minimum version to 3.21 for cmake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants