大家好,
我有个问题请教,cmakelists.txt中的变量如何在程序中使用?比如以下cmakelists.txt文件中的PROJECT_VER变量,我如何在c程序中使用?试了很多办法不知如何使用。
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
set(PROJECT_VER "0.1.4.1")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello-world)
cmakelists.txt中的变量如何在程序中使用?
Re: cmakelists.txt中的变量如何在程序中使用?
请使用 add_compile_option ,具体使用方式见如下链接说明:https://cmake.org/cmake/help/latest/com ... ile_option
Who is online
Users browsing this forum: No registered users and 178 guests