Bug in version_app.cmake

Hi,

There is a bug in ncs\v2.7.99-cs2\nrf\cmake\version_app.cmake

add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/include/generated/app_commit.h
COMMAND ${CMAKE_COMMAND} -DZEPHYR_BASE=${ZEPHYR_BASE} -DNRF_DIR=${NRF_DIR}
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/app_commit.h
-DCOMMIT_TYPE=APP
-DCOMMIT_PATH=${CMAKE_SOURCE_DIR}
-P ${ZEPHYR_NRF_MODULE_DIR}/cmake/gen_commit_h.cmake
DEPENDS ${CMAKE_SOURCE_DIR}/VERSION ${APP_GIT_INDEX}
)

DEPENDS ${CMAKE_SOURCE_DIR}/VERSION ${APP_GIT_INDEX}

should be

DEPENDS ${APPLICATION_SOURCE_DIR}/VERSION ${APP_GIT_INDEX}

Parents
  • Hi,

    Thanks for reporting this. However, I tried testing this with the peripheral_lbs sample from 'v2.7.99-cs2' but was unable to find out any issues with this implementation. Isn't ${CMAKE_SOURCE_DIR} and ${APPLICATION_SOURCE_DIR} the same in your case?

    I made a copy of the SDK sample, placed it in another location outside of the SDK, and made an initial commit.

    Best regards,

    Vidar

Reply
  • Hi,

    Thanks for reporting this. However, I tried testing this with the peripheral_lbs sample from 'v2.7.99-cs2' but was unable to find out any issues with this implementation. Isn't ${CMAKE_SOURCE_DIR} and ${APPLICATION_SOURCE_DIR} the same in your case?

    I made a copy of the SDK sample, placed it in another location outside of the SDK, and made an initial commit.

    Best regards,

    Vidar

Children
Related