Warning Policy CMP0153 is not set

Sysprogs forums Forums VisualGDB Warning Policy CMP0153 is not set


Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #35342
    Timo Engelmann


    during build our STM32CubeMx / Advanced CMake / Ninja project we get the following warning:

    CMake Warning (dev) at C:/Program Files (x86)/Sysprogs/VisualGDB/CMake/embedded/bsp.cmake:242 (exec_program):
    Policy CMP0153 is not set: The exec_program command should not be called.
    Run "cmake --help-policy CMP0153" for policy details. Use the cmake_policy
    command to set the policy and suppress this warning.

    Use execute_process() instead.
    Call Stack (most recent call first):
    CMakeLists.txt:5 (find_bsp)

    The bsp.cmake file contains the following lines:

    if (NOT EXISTS "${_bsp_mak}")
    exec_program(cmd.exe $ENV{VISUALGDB_DIR} ARGS /c VisualGDB.exe /prj2cmake "\"${CMAKE_CURRENT_SOURCE_DIR}\"" "${BSP_ID}" "\"${BSP_SOURCE_PROJECT}\"" \"${BSP_PROJECT_SUBDIR}\" "\"${_bsp_mak}\"")

    How can we suppress or solve this warning?


    Best wishes,

    Timo Engelmann

    The following line gives a hint:

    This warning is for project developers. Use -Wno-dev to suppress it.

    But where should it be set?



    The -Wno-dev could be added to CMake command line via VisualGDB Project Properties  -> CMake Project -> CMake command.

    That said, we have looked into it and replaced exec_program() with execute_process() as recommended by CMake. We initially used exec_program() because of a CMake bug with quoting, but we ran some additional tests and managed to find a workaround that works. Feel free to update to this build: VisualGDB-

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.