diff mbox series

[master,v3] cmake: Add PACKAGECONFIG option for debugger support

Message ID 20250805072443.648964-1-nikhil.r@kpit.com
State New
Headers show
Series [master,v3] cmake: Add PACKAGECONFIG option for debugger support | expand

Commit Message

Nikhil R Aug. 5, 2025, 7:24 a.m. UTC
From: Nikhil R <nikhilr5@kpit.com>

Starting from CMake version 2.27 support for interactive debugging of CMake
scripts and configurations was added. However, by default the `nativesdk-cmake`
is compiled with debugger support turned off.

This change adds debugger support for cmake

Signed-off-by: Nikhil R <nikhilr5@kpit.com>
---
 meta/recipes-devtools/cmake/cmake_4.0.3.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/cmake/cmake_4.0.3.bb b/meta/recipes-devtools/cmake/cmake_4.0.3.bb
index 7d8b8cac65..cfc5cb1b93 100644
--- a/meta/recipes-devtools/cmake/cmake_4.0.3.bb
+++ b/meta/recipes-devtools/cmake/cmake_4.0.3.bb
@@ -43,9 +43,11 @@  EXTRA_OECMAKE = " \
     -DKWSYS_CHAR_IS_SIGNED=1 \
     -DBUILD_CursesDialog=0 \
     -DKWSYS_LFS_WORKS=1 \
-    -DCMake_ENABLE_DEBUGGER=0 \
 "
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[debugger] = "-DCMake_ENABLE_DEBUGGER=1,-DCMake_ENABLE_DEBUGGER=0,"
+
 do_install:append:class-nativesdk() {
     mkdir -p ${D}${datadir}/cmake
     install -m 644 ${UNPACKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/