From 619b8edeb8d70428257f0f06a200ca9d79e8c545 Mon Sep 17 00:00:00 2001 From: Gabriel Somlo Date: Sun, 12 Jul 2026 10:45:25 -0400 Subject: [PATCH] CMake: slang: honor `YOSYS_WITHOUT_SLANG` flag When `YOSYS_WITHOUT_SLANG` (or, more recently, `YOSYS_WITH_PKG_DEPS`) are enabled, do not attempt to build slang frontend. This allows for successful configuration and build with disabled slang when the vendored subrepo is also missing. Signed-off-by: Gabriel Somlo --- frontends/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontends/CMakeLists.txt b/frontends/CMakeLists.txt index 6e6eda488..3972fd811 100644 --- a/frontends/CMakeLists.txt +++ b/frontends/CMakeLists.txt @@ -6,6 +6,8 @@ add_subdirectory(json) add_subdirectory(liberty) add_subdirectory(rpc) add_subdirectory(rtlil) -add_subdirectory(slang) +if (NOT (YOSYS_WITH_PKG_DEPS OR YOSYS_WITHOUT_SLANG)) + add_subdirectory(slang) +endif() add_subdirectory(verific) add_subdirectory(verilog)