From ffcf821435b101dca86463a55f48beed161aac64 Mon Sep 17 00:00:00 2001 From: jw098 Date: Wed, 2 Sep 2026 12:19:34 -0700 Subject: [PATCH] toggle the build for the command line exe --- SerialPrograms/CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SerialPrograms/CMakeLists.txt b/SerialPrograms/CMakeLists.txt index edbacc028c..84e30d8486 100644 --- a/SerialPrograms/CMakeLists.txt +++ b/SerialPrograms/CMakeLists.txt @@ -821,5 +821,11 @@ if (QT_MAJOR GREATER_EQUAL 6) qt_finalize_target(SerialPrograms) endif() -# Add command-line executable (GUI-free) from subdirectory -include(Source/CommandLine/CommandLineExecutable.cmake) + +# Define a toggle option (ON by default) +option(COMMAND_LINE_EXE "Build the optional executable" ON) + +if(COMMAND_LINE_EXE) + # Add command-line executable (GUI-free) from subdirectory + include(Source/CommandLine/CommandLineExecutable.cmake) +endif()