From 8a0229a3bb6ac220202b3d69d5dbce9a11216c97 Mon Sep 17 00:00:00 2001 From: wucke13 Date: Wed, 18 Oct 2023 17:42:45 +0200 Subject: [PATCH] feat(liboqs): allow setting `OQS_PERMIT_UNSUPPORTED_ARCHITECTURE` CMake option via environment variable (#203) fix #202 This allows to set the `OQS_PERMIT_UNSUPOPORTED_ARCHITECTURE` CMake option via an environment variable. --- oqs-sys/build.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/oqs-sys/build.rs b/oqs-sys/build.rs index 357faf3ec5..7ace36a1ec 100644 --- a/oqs-sys/build.rs +++ b/oqs-sys/build.rs @@ -100,6 +100,12 @@ fn build_from_source() -> PathBuf { } else { config.define("OQS_USE_OPENSSL", "No"); } + + let permit_unsupported = "OQS_PERMIT_UNSUPPORTED_ARCHITECTURE"; + if let Ok(str) = std::env::var(permit_unsupported) { + config.define(permit_unsupported, str); + } + let outdir = config.build_target("oqs").build(); // lib is put into $outdir/build/lib