# Standalone armeabi-v7a artifact for the 2026-09-16 "isolated
# std::ostringstream repro" test (see ARM64_TRANSLATION_LAYER.md and
# ostream_repro.cpp's own top comment). Same pattern as ../trace_agent's own
# CMakeLists.txt - deliberately NOT wired into the main Gradle build
# (settings.gradle.kts), built and pushed to the device independently via
# build.sh. Default STL linkage (c++_shared, the NDK CMake toolchain's own
# default - NOT overridden to c++_static here) is a deliberate choice, not
# an oversight - see ostream_repro.cpp's top comment for why matching
# libapp.so's own dynamic-libc++ linkage matters for this specific test.
cmake_minimum_required(VERSION 3.22.1)
project(ostream_repro)

add_library(ostream_repro SHARED
    ostream_repro.cpp
)

target_compile_options(ostream_repro PRIVATE -Wall -Wno-unused-parameter)

# Standalone native executable (2026-09-17, ARM64_TRANSLATION_LAYER.md - "does
# real hardware ever see runaway basic_stringbuf::overflow() growth" check).
# See ostream_stress.cpp's own top comment. Independent target, does not
# affect the ostream_repro library above.
add_executable(ostream_stress
    ostream_stress.cpp
)
target_compile_options(ostream_stress PRIVATE -Wall -Wno-unused-parameter)
