catkin_make 编译包无效(没反应)

- catkin_make 编译指定的功能包失效?
可能是如下原因:
这时需要编译全部功能包,

catkin_make -DCATKIN_WHITELIST_PACKAGES=""

或者在双引号内加入你需要编译的包

catkin_make -DCATKIN_WHITELIST_PACKAGES="package_name1;package_name2"

注意不是src下的文件夹名字,而是文件夹下package.xml里面的包的名字,或者CMaklists.txt的项目的名字。不然会找不到,导致不会编译。

- 系统Boost-1.74版本问题引起编译error

CMake Warning (dev) at /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake:240 (if):
  Policy CMP0057 is not set: Support new IN_LIST if() operator.  Run "cmake
  --help-policy CMP0057" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  IN_LIST will be interpreted as an operator when the policy is set to NEW.
  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:245 (find_package)
  depth_camera/ros_astra_camera/CMakeLists.txt:6 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /usr/local/lib/cmake/Boost-1.74.0/BoostConfig.cmake:240 (if):
  if given arguments:

    "ALL" "IN_LIST" "Boost_FIND_COMPONENTS"

  Unknown arguments specified
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:245 (find_package)

找到对应的cmakelists.txt的内容
在find_package(Boost REQUIRED)前面增加下面内容

if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()

你可能感兴趣的:(C++基础,人工智能)