Skip to content

CMake: require Netgen when BUILD_FEM_NETGEN is ON, don't fail silently#25990

Merged
chennes merged 2 commits intoFreeCAD:mainfrom
Lgt2x:find-netgen-fix
Feb 3, 2026
Merged

CMake: require Netgen when BUILD_FEM_NETGEN is ON, don't fail silently#25990
chennes merged 2 commits intoFreeCAD:mainfrom
Lgt2x:find-netgen-fix

Conversation

@Lgt2x
Copy link
Contributor

@Lgt2x Lgt2x commented Dec 6, 2025

When BUILD_FEM_NETGEN is ON and Netgen could not be found, CMake generation would still happen and caused build errors later on. Using find_package_handle_standard_args fixes this behavior.

@github-actions github-actions bot added the Packaging/building Related to building, compiling or packaging FreeCAD label Dec 6, 2025
@maxwxyz maxwxyz added the Type: Other Tasks, refactoring, quality improvement, actions, dependencies, packaging, translations or other... label Dec 7, 2025
@maxwxyz maxwxyz added this to the 1.2 milestone Dec 7, 2025
@Lgt2x
Copy link
Contributor Author

Lgt2x commented Dec 7, 2025

CI was not happy, because when using external smesh, we were still calling find_netgen only to add the definitions and exited silently. This is not the canonical use for CMake find modules. This also explained why the package was not REQUIRED. I hope it's fixed now.

Copy link

@vincele vincele left a comment

Choose a reason for hiding this comment

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

LGTM

@chennes chennes merged commit ed6c0c8 into FreeCAD:main Feb 3, 2026
12 of 13 checks passed
@github-project-automation github-project-automation bot moved this from Queue to Done in Merge Queue Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Packaging/building Related to building, compiling or packaging FreeCAD Type: Other Tasks, refactoring, quality improvement, actions, dependencies, packaging, translations or other...

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants