"""
@file
@defgroup examples_exampleDataTask_optimiser_app Application
@ingroup examples_exampleDataTask_optimiser

@brief Custom RTC Component Application.

@copyright
  SPDX-FileCopyrightText: 2021-2025 European Southern Observatory (ESO) @n
  SPDX-License-Identifier: LGPL-3.0-only
"""

from wtools.module import declare_cprogram


declare_cprogram(
    target="rtctkExampleDataTaskOptimiser",
    ldflags="-rdynamic",
    cxxflags="-fvisibility=hidden",
    # Note: rtctk_pythonpath is a workaround until wtools have better support for pyembed
    # and propagation of python dependencies to non-python tests
    features=["pyembed", "rtctk_pythonpath"],
    valgrind_suppression=[
        "../../../../componentFramework/services/python/test/pythonSuppressionFile.supp"
    ],
    use=[
        "componentFramework.rtcComponent",
        "openblas",
        "componentFramework.services.python",
        "_examples.exampleDataTask.optimiser.pyLib",
        "pybind11",
    ],
    # Configures feature `rtctk_pythonpath` to set PYTHONPATH
    rtctk_pythonpath_use=["_examples.exampleDataTask.optimiser.pyLib"],
)
