Skip to content

[Mirror] FROSch: Fix build without Thyra#105

Open
csiefer2 wants to merge 1 commit intodevelopfrom
pr-mirror-15183
Open

[Mirror] FROSch: Fix build without Thyra#105
csiefer2 wants to merge 1 commit intodevelopfrom
pr-mirror-15183

Conversation

@csiefer2
Copy link
Copy Markdown
Owner

Automated mirror of upstream PR trilinos#15183 @trilinos/shylu

Motivation

FROSch build fails if Thyra is disabled. This should fix it.

@github-actions
Copy link
Copy Markdown

CDash for AT1 results [Only accessible from Sandia networks]
CDash for AT2 results [Currently only accessible from Sandia networks]

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the CMakeLists.txt file to conditionally include Thyra-related headers based on the ${PACKAGE_NAME}_ENABLE_Thyra flag. The review feedback recommends also moving Stratimikos-related headers and the corresponding source files into this conditional block to ensure build consistency and prevent errors when Thyra is disabled.


ASSERT_DEFINED(${PACKAGE_NAME}_ENABLE_Thyra)
IF (${PACKAGE_NAME}_ENABLE_Thyra)
APPEND_SET(HEADERS
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The Stratimikos-related headers (Adapters/Stratimikos_FROSch_decl.hpp and Adapters/Stratimikos_FROSch_def.hpp) should also be moved into this conditional block, as they depend on the Stratimikos package (which in turn depends on Thyra). Please ensure they are removed from the main HEADERS list at the top of the file (lines 58-59) to avoid duplication and potential build errors when Thyra is disabled.

  APPEND_SET(HEADERS
    Adapters/Stratimikos_FROSch_decl.hpp
    Adapters/Stratimikos_FROSch_def.hpp

SolverInterfaces/FROSch_ThyraSolver_decl.hpp
SolverInterfaces/FROSch_ThyraSolver_def.hpp
)
ENDIF()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The corresponding source files (.cpp) for these Thyra and Stratimikos adapters must also be wrapped in a similar IF (${PACKAGE_NAME}_ENABLE_Thyra) block in the SOURCES section (starting at line 161). If the source files are not guarded, the build will still fail during compilation even if the headers are correctly handled in the HEADERS list.

Signed-off-by: Christian Glusa <caglusa@sandia.gov>
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.

2 participants