Hi,
My project is set up as out-of-tree using NCS v2.0.0. I would like to restrict the NCS version such that it will throw a compile-time error if a non-matching version of NCS is used to build.
Is there a convenient way to do this with cmake?
Hi,
My project is set up as out-of-tree using NCS v2.0.0. I would like to restrict the NCS version such that it will throw a compile-time error if a non-matching version of NCS is used to build.
Is there a convenient way to do this with cmake?
Hi
I looked through our nRF Connect SDK, but found no variables for the version number.
So I think the easiest way would be to call git from CMakeLists.txt:
set(NRF $ENV{ZEPHYR_BASE}/../nrf/) execute_process(COMMAND git describe --tags WORKING_DIRECTORY "${NRF}")
Regards,
Sigurd Hellesvik
Just found a better way:
Version is in nrf/VERSION:
set(NRF $ENV{ZEPHYR_BASE}/../nrf/) file(READ "${NRF}/VERSION" version) message("${version}")
Regards,
Sigurd Hellesvik