From e18cfc70d52b798d4075980b8ea2193f64c9822d Mon Sep 17 00:00:00 2001 From: alokkumardalei-wq Date: Tue, 14 Apr 2026 11:55:25 +0530 Subject: [PATCH] cmake: unset BUILD_GUI when Qt5 is not found When BUILD_GUI is ON but Qt5 is not found, the build silently falls back to a stub library. However, the top-level CMakeLists.txt still sets the BUILD_GUI=1 compile definition based on the option alone, causing openroad_gui_compiled to return true at runtime even though gui::show was never registered. This leads to "invalid command name gui::show" errors in batch mode. Fix by unsetting BUILD_GUI in the cache when Qt5 is not found, so the compile definition correctly reflects the actual build state. Resolves The-OpenROAD-Project/OpenROAD-flow-scripts#4134 Signed-off-by: alokkumardalei-wq --- src/gui/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 3fcffba00c6..532eb7120bc 100755 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -153,6 +153,7 @@ messages( else() if(BUILD_GUI) message(STATUS "QT5 not found. GUI is disabled") + set(BUILD_GUI OFF CACHE BOOL "Build the GUI" FORCE) else() message(STATUS "GUI is not enabled") endif()