看下面的例子,我们在cmake定义了一个变量“USER_KEY”,并打印此变量值。status表示这是一般的打印信息,我们还可以设置为“ERROR”,表示这是一种错误打印信息。

SET(USER_KEY, "Hello World")
MESSAGE( STATUS "this var key = ${USER_KEY}.")

 

资料:

     message — CMake 3.0.2 Documentation https://cmake.org/cmake/help/v3.0/command/message.html

 

完。

相关文章:

  • 2022-01-15
  • 2021-12-09
  • 2021-12-09
  • 2021-07-27
  • 2022-02-08
  • 2022-02-09
  • 2021-08-29
猜你喜欢
  • 2021-10-05
  • 2021-12-18
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案