(rule
 (action
  (copy ../../src_lockfree/treiber_stack.ml treiber_stack.ml))
 (package saturn_lockfree))

(test
 (package saturn_lockfree)
 (name treiber_stack_dscheck)
 (libraries atomic dscheck alcotest backoff multicore-magic)
 (build_if
  (and
   (>= %{ocaml_version} 5)
   (not
    (and
     (= %{arch_sixtyfour} false)
     (= %{architecture} arm)))))
 (modules treiber_stack treiber_stack_dscheck))

(test
 (package saturn_lockfree)
 (name qcheck_treiber_stack)
 (libraries
  saturn_lockfree
  barrier
  qcheck
  qcheck-core
  qcheck-alcotest
  domain_shims
  alcotest)
 (modules qcheck_treiber_stack))

(test
 (package saturn_lockfree)
 (name stm_treiber_stack)
 (modules stm_treiber_stack)
 (libraries saturn_lockfree qcheck-core qcheck-stm.stm stm_run)
 (enabled_if
  (= %{arch_sixtyfour} true)))
