【发布时间】:2019-07-03 04:03:22
【问题描述】:
我想用 CMake 显示 Foo::Bar 的内容。 怎么做?
message(STATUS "Foo::Bar -> ${Foo::Bar}")
# example case : Boost
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
find_package(Boost REQUIRED)
# I want to display contents of Boost::headers.
# I think it is contain header path. How to display it on CMake output?
# message(STATUS "Boost::headers -> ${Boost::headers}")
# I expect the following output.
# Boost::headers -> (path_to_boost_root)/include/boost-1_70
【问题讨论】:
-
什么是
Foo::Bar?它是一个变量吗?目标?它是什么?I think it is contain header path.不,Boost::headers 是目标的名称,它不会“打印”任何东西,没有Boost::headers变量。
标签: cmake