diff mbox series

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

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

Commit Message

Nikhil R Aug. 5, 2025, 6:57 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 | 3 +++
 1 file changed, 3 insertions(+)

Comments

Gyorgy Sarvari Aug. 5, 2025, 7:04 a.m. UTC | #1
On 8/5/25 08:57, nikhil via lists.openembedded.org wrote:
> 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 | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta/recipes-devtools/cmake/cmake_4.0.3.bb b/meta/recipes-devtools/cmake/cmake_4.0.3.bb
> index 7d8b8cac65..b47494f274 100644
> --- a/meta/recipes-devtools/cmake/cmake_4.0.3.bb
> +++ b/meta/recipes-devtools/cmake/cmake_4.0.3.bb
> @@ -46,6 +46,9 @@ EXTRA_OECMAKE = " \
>      -DCMake_ENABLE_DEBUGGER=0 \

Since you are adding CMake_ENABLE_DEBUGGER from PACKAGECONFIG below, it
doesn't need to be present explicitly in EXTRA_OECMAKE anymore (the
cmake class will add it, with the appropriate value)

>  "
>  
> +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/
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#221457): https://lists.openembedded.org/g/openembedded-core/message/221457
> Mute This Topic: https://lists.openembedded.org/mt/114544863/6084445
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
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..b47494f274 100644
--- a/meta/recipes-devtools/cmake/cmake_4.0.3.bb
+++ b/meta/recipes-devtools/cmake/cmake_4.0.3.bb
@@ -46,6 +46,9 @@  EXTRA_OECMAKE = " \
     -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/