From 405623610da5d5228167fd91e701042f2c18ad38 Mon Sep 17 00:00:00 2001 From: craff Date: Tue, 6 Dec 2022 17:36:23 -1000 Subject: [PATCH] conditional compilation for ocaml 4 --- dune-project | 2 +- examples/dune | 2 ++ src/domains/dune | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dune-project b/dune-project index 929c696e..5bbef0b4 100644 --- a/dune-project +++ b/dune-project @@ -1 +1 @@ -(lang dune 2.0) +(lang dune 2.5) diff --git a/examples/dune b/examples/dune index 741e204c..790f07e6 100644 --- a/examples/dune +++ b/examples/dune @@ -7,6 +7,7 @@ (executable (name sse_server_domains) (modules sse_server_domains) + (enabled_if (>= %{ocaml_version} 5.00.0)) (libraries tiny_httpd tiny_httpd_domains unix ptime ptime.clock.os)) (executable @@ -23,6 +24,7 @@ (executable (name echo_domains) (flags :standard -warn-error -a+8) + (enabled_if (>= %{ocaml_version} 5.00.0)) (modules echo_domains vfs_domains) (libraries tiny_httpd tiny_httpd_camlzip tiny_httpd_domains)) diff --git a/src/domains/dune b/src/domains/dune index 1aa16574..573cfd33 100644 --- a/src/domains/dune +++ b/src/domains/dune @@ -2,6 +2,7 @@ (library (name tiny_httpd_domains) (public_name tiny_httpd_domains) + (enabled_if (>= %{ocaml_version} 5.00.0)) (synopsis "Allowing to use ocaml domains instead of theads") (flags :standard -safe-string -warn-error -a+8) (libraries tiny_httpd domainslib))