From 96f005d31747a6bd92da0abfba7fedec997a0eaf Mon Sep 17 00:00:00 2001
From: Praneet Rathi <prrathi10@gmail.com>
Date: Sat, 18 Jan 2025 12:27:20 -0600
Subject: [PATCH] feature dep

---
 hercules_samples/ccp/Cargo.toml | 8 ++++----
 juno_build/Cargo.toml           | 5 +++--
 juno_frontend/Cargo.toml        | 6 ++++--
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/hercules_samples/ccp/Cargo.toml b/hercules_samples/ccp/Cargo.toml
index a5259a92..c665e73f 100644
--- a/hercules_samples/ccp/Cargo.toml
+++ b/hercules_samples/ccp/Cargo.toml
@@ -7,11 +7,11 @@ edition = "2021"
 [features]
 cuda = ["juno_build/cuda"]
 
-[build-dependencies]
-juno_build = { path = "../../juno_build" }
-
 [dependencies]
-juno_build = { path = "../../juno_build" }
+juno_build = { path = "../../juno_build", features = [] }
 rand = "*"
 async-std = "*"
 with_builtin_macros = "0.1.0"
+
+[build-dependencies]
+juno_build = { path = "../../juno_build", features = [] }
diff --git a/juno_build/Cargo.toml b/juno_build/Cargo.toml
index 13889171..79b29c87 100644
--- a/juno_build/Cargo.toml
+++ b/juno_build/Cargo.toml
@@ -5,9 +5,10 @@ authors = ["Aaron Councilman <aaronjc4@illinois.edu>"]
 edition = "2021"
 
 [features]
-cuda = ["juno_frontend/cuda"]
+cuda = ["juno_frontend/cuda", "dep:cuda-support"]
 
 [dependencies]
-juno_frontend = { path = "../juno_frontend" }
+juno_frontend = { path = "../juno_frontend", default-features = false }
 hercules_ir = { path = "../hercules_ir" }
 with_builtin_macros = "0.1.0"
+cuda-support = { path = "../cuda-support", optional = true }
diff --git a/juno_frontend/Cargo.toml b/juno_frontend/Cargo.toml
index 3c3d557f..05957554 100644
--- a/juno_frontend/Cargo.toml
+++ b/juno_frontend/Cargo.toml
@@ -5,7 +5,8 @@ authors = ["Aaron Councilman <aaronjc4@illinois.edu>"]
 edition = "2021"
 
 [features]
-cuda = ["hercules_opt/cuda"]
+cuda = ["hercules_opt/cuda", "dep:cuda-support"]
+default = []
 
 [[bin]]
 name = "juno"
@@ -21,6 +22,8 @@ lrlex = "0.13"
 lrpar = "0.13"
 
 [dependencies]
+hercules_opt = { path = "../hercules_opt", default-features = false }
+cuda-support = { path = "../cuda-support", optional = true }
 cfgrammar = "0.13"
 clap = { version = "*", features = ["derive"] }
 lrlex = "0.13"
@@ -30,5 +33,4 @@ num-traits = "*"
 ordered-float = "*"
 phf = { version = "0.11", features = ["macros"] }
 hercules_ir = { path = "../hercules_ir" }
-hercules_opt = { path = "../hercules_opt" }
 juno_scheduler = { path = "../juno_scheduler" }
-- 
GitLab