Cmake 未知命令

Cmake 未知命令
cmake version 3.7.2
CMake Error at CMakeLists.txt:1 (INCLUDE_SUBDIRECTORY):
  Unknown CMake command "INCLUDE_SUBDIRECTORY".


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

    cmake_minimum_required(VERSION 3.7)  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!

../CMakeLists.txt

CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
# allow more human readable "if then else" constructs
#SET( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE )
# Add the local Find*.cmake scripts
LIST (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)

PROJECT( CellSearch )
ENABLE_TESTING()

答案1

编译时OpenUSRP你需要添加INCLUDE_SUBDIRECTORY(OpenUSRP)uhd/host/lib/usrp/CMakeLists.txt但你却将它添加到OpenUSRP/CMakeLists.txt。在目录中克隆 OpenUSRP 也很重要uhd/host/lib/usrp/

严格按照描述执行所有命令https://github.com/jocover/OpenUSRP#libuhd-mode或者https://github.com/jocover/OpenUSRP/blob/6f6028c30161f1ce63222722b0da8e6d68b203af/.travis.yml#L50-L60

我已在https://github.com/jocover/OpenUSRP/issues/12以及

编译时LTE-Cell-Scanner你不应该做任何这样的修改。我已在https://github.com/JiaoXianjun/LTE-Cell-Scanner/issues/29

相关内容