extra cmake arguments ignored in SDK 2.7.0 using sysbuild

Hello
In SDK 2.6.xx I used to define an extra CMake argument in the VSCode UI, i.e  "-DMFG=1"
This argument was available when CMakeLists.txt was processed so I could do additional processing i.e
if(MFG)
additional processing..
endif()
This broke in 2.7.0 and higher which use sysbuild
The argument is on the command line generated by VSCode but not available to CMake 
What's the recommended way to make it visible to CMake in SDK 2.7.0 and later that use sysbuild?
Thanks

Andy

Parents
  • Hello Andy,

    Please take a look at the following TechDocs link that discusses Sysbuild and the required configuration and setup: Configuring sysbuild (specifically, I believe Sysbuild images may be of most interest).

    Please let us know if you still feel it is a bug.

    Thank you,
    Jennifer Gibbs

  • The doc talks about setting a custom property:

    set_property(TARGET ${SB_CONFIG_NETCORE_IMAGE_NAME} APPEND_STRING PROPERTY CONFIG "CONFIG_CUSTOM_STRING=my_custom_value\n")

    I tried that but when the application CMakeLists.txt is processed the "CUSTOM_CONFIG_STRING" is empty

    Maybe I'm not doing it right. What would be the appropriate syntax? All I need is to make the extra command argument visible to Cmake when the app is built. It is visible to the sysbuild.cmake but it looks like it is not passed to the application CMake and when CMakeLists.txt is processed it is not set

    Yes, I still think it's a bug. It seems that when a user passes a CMake argument it should be visible to all participants of the build process.

Reply
  • The doc talks about setting a custom property:

    set_property(TARGET ${SB_CONFIG_NETCORE_IMAGE_NAME} APPEND_STRING PROPERTY CONFIG "CONFIG_CUSTOM_STRING=my_custom_value\n")

    I tried that but when the application CMakeLists.txt is processed the "CUSTOM_CONFIG_STRING" is empty

    Maybe I'm not doing it right. What would be the appropriate syntax? All I need is to make the extra command argument visible to Cmake when the app is built. It is visible to the sysbuild.cmake but it looks like it is not passed to the application CMake and when CMakeLists.txt is processed it is not set

    Yes, I still think it's a bug. It seems that when a user passes a CMake argument it should be visible to all participants of the build process.

Children
Related