Skip to content

Make macros T8_ENABLE_VTK etc. available to linking libraries. #2007

Open
2 of 2 issues completed
Open

Description

@holke

Feature request

Edit: We have found an easy solution that does not require to generate a header file but works exclusively in CMake.
See #2012 and #2100.

When a library links against t8code, they cannot access T8_ENABLE_VTK, T8_ENABLE_OCC and other macros.
We should make these available in t8code header.
This is possible using cmake configure_file.

Is your feature request related to a problem? Please describe.
External libraries using t8code cannot see if t8code is linked against another library (for example VTK) and with which version of that library.

Describe the solution or feature you'd like
For each external library LIBNAME, create a header file containing at least these macros:

T8_ENABLE_LIBNAME // 0 or 1 depending on whether t8code is linked against LIBNAME or not.
T8_LIBNAME_MAJOR_VERSION // Defined only if T8_ENABLE_LIBNAME  is true. The major version number of LIBNAME that t8code links again.
T8_LIBNAME_MINOR_VERSION // Defined only if T8_ENABLE_LIBNAME  is true. The minor version number of LIBNAME that t8code links again.  

Describe alternatives you've considered
N/A

Estimated priority

"Priority: medium" Should be solved within half a year

Additional context
I already propose a solution and implemented it for VTK. See the PR.

Activity

  1. added theissue type on Dec 1, 2025
  2. spenke91 commented on Dec 1, 2025

    @spenke91
    Collaborator

    We discussed in the dev meeting and agreed that are more CMake-style way would be preferable -- if it exists...

  3. added
    priority:lowShould be solved eventually
    workload:lowWould take half a day or less
    priority:mediumShould be solved within half a year
    and removed
    priority:lowShould be solved eventually
    on Dec 1, 2025
  4. moved this from In-Box to ToDo in t8code's Issue Landing pageon Dec 1, 2025
  5. holke commented on Jan 16, 2026

    @holke
    CollaboratorAuthor

    We have found an easy solution that does not require to generate a header file but works exclusively in CMake.
    See #2012 and #2100.

    Once these are reviewed, we can apply the logic to OCC and other external libs as well.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions