import libs = libsimbody%lib{SimTKcommon}

macos   = ($cxx.target.class == 'macos')

if! $macos
  import libs += liboneapi-mkl%libs{mkl-thread-tbb}

./: tests/hxx{*} # Ensure any headers are distributed

# Note: Exclude BNTTest.cpp because it fails to compile under g++ 14.2.0 for
#       what seems like OK if complicated code (error: no conversion from
#       conjugate<float> to std::complex<double>). If it were my own code I
#       would take the time to fix it but, alas, it is not.
#
#       Exclude SFMTTest because it includes a header from the src/ directory
#       which is not installed and thus test-installed fails on CI. Turning
#       these into unit tests would fix it but all of the other tests use only
#       the public API so it seems like the overall intention is for these to
#       be integration tests. Should probably report this upstream.
#
for t: tests/cxx{* -SFMTTest}
{
  n = $name($t)

  ./: exe{$name($t)}: include = ($n != 'BNTTest' || $cxx.id.type != 'gcc')
  exe{$name($t)}: $t testscript $libs
}

exe{TestPolygonalMesh}: test.cleanups = '&anchor1.vtp'  \
                                        '&plane.vtp'    \
                                        '&planeNoNormals.vtp'
