load("//:CPPVARIABLES.bzl", "DDS_CPPOPTS", "DDS_LINKOPTS", "DDS_LOCAL_DEFINES", "DDS_SCHEDULER_DEFINE")
load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "solver_context",
    srcs = ["solver_context.cpp"],
    hdrs = ["solver_context.hpp"],
    visibility = ["//visibility:public"],
    includes = ["."],
    include_prefix = "solver_context",
    deps = [
        "//library/src/system",               # ThreadData.h, Utilities
        "//library/src/api:api_definitions",  # <api/dds.h>
        "//library/src/trans_table",          # TT headers
    ],
    copts = DDS_CPPOPTS,
    linkopts = DDS_LINKOPTS,
    local_defines = DDS_LOCAL_DEFINES + DDS_SCHEDULER_DEFINE,
)

cc_library(
    name = "solver_context_log",
    srcs = ["solver_context.cpp"],
    hdrs = ["solver_context.hpp"],
    visibility = ["//visibility:public"],
    includes = ["."],
    include_prefix = "solver_context",
    deps = [
        "//library/src/system",
        "//library/src/api:api_definitions",
        "//library/src/trans_table",
    ],
    copts = DDS_CPPOPTS,
    linkopts = DDS_LINKOPTS,
    local_defines = DDS_LOCAL_DEFINES + DDS_SCHEDULER_DEFINE + ["DDS_UTILITIES_LOG"],
)

cc_library(
    name = "solver_context_stats",
    srcs = ["solver_context.cpp"],
    hdrs = ["solver_context.hpp"],
    visibility = ["//visibility:public"],
    includes = ["."],
    include_prefix = "solver_context",
    deps = [
        "//library/src/system",
        "//library/src/api:api_definitions",
        "//library/src/trans_table",
    ],
    copts = DDS_CPPOPTS,
    linkopts = DDS_LINKOPTS,
    local_defines = DDS_LOCAL_DEFINES + DDS_SCHEDULER_DEFINE + ["DDS_UTILITIES_STATS"],
)
