Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMAKE info message before fetching content #9

Closed
TimmRuppert opened this issue Dec 11, 2024 · 0 comments · Fixed by #12
Closed

Add CMAKE info message before fetching content #9

TimmRuppert opened this issue Dec 11, 2024 · 0 comments · Fixed by #12
Assignees
Labels
enhancement New feature or request

Comments

@TimmRuppert
Copy link
Collaborator

Describe the feature

  • The cmake directive FetchContent_MakeAvailable might take some time. It might feel like cmake hangs.
  • Give the user information if a local provided OSI is used or if one is downloaded

Maybe something like this

# Locate open_simulation_interface using find_package or custom path.
if (USE_EXTERNAL_OSI)
    message(FATAL_ERROR "USE_EXTERNAL_OSI is not implemented yet")
else ()
    # Download and use our own open_simulation_interface package.
    include(FetchContent)

    # Message to indicate download is starting
    message(STATUS "Using internal OSI, starting to download open_simulation_interface...")

    FetchContent_Declare(
            open_simulation_interface
            GIT_REPOSITORY https://github.com/OpenSimulationInterface/open-simulation-interface.git
            GIT_TAG v3.7.0
    )

    # Set FETCHCONTENT_QUIET to OFF to show detailed messages about fetching.
    set(FETCHCONTENT_QUIET OFF)

    # Make the package available and display a message once done.
    FetchContent_MakeAvailable(open_simulation_interface)

    message(STATUS "Finished fetching open_simulation_interface.")

    # Set include directory variable.
    set(OSI_INCLUDE_DIR ${open_simulation_interface_BINARY_DIR})
endif ()
@TimmRuppert TimmRuppert added the enhancement New feature or request label Dec 11, 2024
@TimmRuppert TimmRuppert self-assigned this Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant