1

我继承了一个代码库,作者无法回答问题:/

每当我尝试编译它时:

source ~/source/path-to-zephyr/zephyr-env.sh
cd ~/source/path-to-wallet/
mkdir build; cd build; cmake -GNinja -DBOARD=qemu_x86 -DBUILD_XCOMPILE=1 ../

CMake Error at cmake/zephyr.cmake:7 (zephyr_get_include_directories_for_lang_as_string):
  Unknown CMake command "zephyr_get_include_directories_for_lang_as_string".
Call Stack (most recent call first):
  CMakeLists.txt:15 (include)


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.13)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/home/shinichi/source/wallet/build/CMakeFiles/CMakeOutput.log".

为什么 CMake 找不到 $ZEPHYR_BASE?它肯定知道以某种方式找到在zephyr_get_include_directories_for_lang_as_string那里调用的函数,否则编译说明会提到一些额外的必要步骤。

所以我对 cmake 进行了一些研究,并认为我会将这一行添加到 wallet/CMakeLists.txt: include($ENV{ZEPHYR_BASE}/cmake/extensions.cmake)

但这只是给了我更多的错误,这表明没有找到 Zephyr RTOS 代码的更深层次的东西:

...
 get_property could not find TARGET zephyr_interface.  Perhaps it has not
  yet been created.
Call Stack (most recent call first):
  /home/shinichi/source/zephyrproject/zephyr/cmake/extensions.cmake:187 (get_property_and_add_prefix)
  /home/shinichi/source/zephyrproject/zephyr/cmake/extensions.cmake:155 (zephyr_get_include_directories_for_lang)
  cmake/zephyr.cmake:7 (zephyr_get_include_directories_for_lang_as_string)
  CMakeLists.txt:16 (include)


CMake Error at /home/shinichi/source/zephyrproject/zephyr/cmake/extensions.cmake:301 (get_property):
  get_property could not find TARGET zephyr_interface.  Perhaps it has not
  yet been created.
Call Stack (most recent call first):
  /home/shinichi/source/zephyrproject/zephyr/cmake/extensions.cmake:198 (get_property_and_add_prefix)
  /home/shinichi/source/zephyrproject/zephyr/cmake/extensions.cmake:163 (zephyr_get_system_include_directories_for_lang)
  cmake/zephyr.cmake:8 (zephyr_get_system_include_directories_for_lang_as_string)
  CMakeLists.txt:16 (include)
...

有任何想法吗?

4

0 回答 0