[GeoMechanicsApplication] Separate test suites to improve compilation #14029
+96
−53
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR puts the suite without kernel in a separate file. This means that any test that only includes the new file, (implicitly) includes a lot less headers. This has two advantages:
In this PR the separation and one example is shown. For this specific example the compile times are as follows:
before:
38279ms applications/GeoMechanicsApplication/CMakeFiles/KratosGeoMechanicsCoreTest.dir/tests/cpp_tests/custom_conditions/test_axisymmetric_U_Pw_normal_face_load_condition.cpp.obj
after:
28510ms applications/GeoMechanicsApplication/CMakeFiles/KratosGeoMechanicsCoreTest.dir/tests/cpp_tests/custom_conditions/test_axisymmetric_U_Pw_normal_face_load_condition.cpp.obj
Of course due to parallel building this doesn't mean we win 10 seconds for each test, but it is significant and also helps rebuilding less often in the first place (winning even more time).
By slowly converting tests in the same fashion as this example, we'll improve include health and build times