cmake_minimum_required(VERSION 3.15)

project(qmath)

set(CMAKE_CXX_STANDARD 20)

find_package(pybind11 REQUIRED)

pybind11_add_module(
    _qmath

    qmath/backend/cpp/bindings.cpp

    qmath/backend/cpp/core/matrix.cpp
    qmath/backend/cpp/core/vector.cpp
    qmath/backend/cpp/algebra/decompositions.cpp
    qmath/backend/cpp/formulas/numerical.cpp
)

target_link_options(_qmath PRIVATE -static -static-libgcc -static-libstdc++)

install(TARGETS _qmath DESTINATION qmath)
