小编ken*_*ken的帖子

如何在CMake中显示Foo::Bar的内容?

我想用 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
Run Code Online (Sandbox Code Playgroud)

cmake

2
推荐指数
1
解决办法
1315
查看次数

标签 统计

cmake ×1