You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is a good idea to document CMake cache variables VERSION_OUT_DIR and VERSION_SOURCE_DIR in README, for projects where CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR can't be used as their values.
One example is incorporating external library which uses Version.cmake into project based on Zephyr RTOS, using their tool west.
As CMake is invoked in the Zephyr RTOS project, CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR refer to the zephyr project and git commands are invoked on incorrect project.
This can be circumvented, for example, if VERSION_OUT_DIR and VERSION_SOURCE_DIR are set to CMAKE_CURRENT_BINARY_DIR and CMAKE_CURRENT_SOURCE_DIR respectively, before invoking find_package(Version.cmake) in the external library CMakeLists.txt.
The text was updated successfully, but these errors were encountered:
I think it is a good idea to document CMake cache variables
VERSION_OUT_DIR
andVERSION_SOURCE_DIR
inREADME
, for projects whereCMAKE_BINARY_DIR
andCMAKE_SOURCE_DIR
can't be used as their values.One example is incorporating external library which uses
Version.cmake
into project based on Zephyr RTOS, using their tool west.As CMake is invoked in the Zephyr RTOS project,
CMAKE_SOURCE_DIR
andCMAKE_BINARY_DIR
refer to the zephyr project andgit
commands are invoked on incorrect project.This can be circumvented, for example, if
VERSION_OUT_DIR
andVERSION_SOURCE_DIR
are set toCMAKE_CURRENT_BINARY_DIR
andCMAKE_CURRENT_SOURCE_DIR
respectively, before invokingfind_package(Version.cmake)
in the external libraryCMakeLists.txt
.The text was updated successfully, but these errors were encountered: