cmake_minimum_required(VERSION 3.15)
project(reforge_core LANGUAGES CXX)

if(SKBUILD)
  set(BUILD_TESTING OFF CACHE BOOL "Disable native tests in Python wheels" FORCE)
endif()
include(CTest)

if(POLICY CMP0148)
  cmake_policy(SET CMP0148 NEW)
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PYBIND11_FINDPYTHON ON CACHE BOOL "Use CMake FindPython for pybind11" FORCE)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)

# Build the Python-independent foundation first so legacy SDK consumers can
# link its exported targets without recreating native implementations.
add_subdirectory(native)

add_subdirectory(reforge_core)
