1 Star 2 Fork 0

WXQ / TMCC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMake.utils.txt 687 Bytes
一键复制 编辑 原始数据 按行查看 历史
WXQ 提交于 2023-10-02 17:28 . First Commit, Version 0.1.0
#
# This script is inclued by CMakeLists.txt.
#
# this function redefines __FILE__
# and for GCC, you should use this command:
# add_definitions(-Wno-builtin-macro-redefined)
#
function(redefine_file_macro target)
get_target_property(source_files "${target}" SOURCES)
foreach(srcfile ${source_files})
get_property(defs SOURCE "${srcfile}" PROPERTY COMPILE_DEFINITIONS)
get_filename_component(filepath "${srcfile}" ABSOLUTE)
string(REPLACE "${PROJECT_SOURCE_DIR}/" "" relpath "${filepath}")
list(APPEND defs "__FILE__=\"${relpath}\"")
set_property(SOURCE "${srcfile}" PROPERTY COMPILE_DEFINITIONS ${defs})
endforeach ()
endfunction()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/hapywxq/tmcc.git
git@gitee.com:hapywxq/tmcc.git
hapywxq
tmcc
TMCC
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891