如何解决如何将 cmake 创建的自定义规则转换为 VS 自定义构建?
Cmakerule
它在 CMake 构建期间使用由 CMake 创建的 isocpp_idlpp.bat
setlocal
call isocpp_idlpp.bat C:/Users/king/Source/Data.idl
if %errorlevel% neq 0 goto :cmend
:cmend
endlocal & call :cmerrorLevel %errorlevel% & goto :cmDone
:cmerrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
其他同下输出,依赖
我在 C:/Users/king/Source/test/Data.idl 创建了一个新的 idl(添加到 VS 项目的 MIDL 文件) 我需要在没有 CMake 的情况下在我的 VS 项目上运行这个 cmake 规则......以便我在 Data.idl 属性上设置以下属性--> 自定义构建工具
链接对象= no
自定义构建工具
Commandline 在 CMake 规则中使用与上面相同的命令行.... isocpp_idlpp.bat 在项目目录中
setlocal
call isocpp_idlpp.bat C:/Users/king/Source/test/Data.idl
if %errorlevel% neq 0 goto :cmend
:cmend
endlocal & call :cmerrorLevel %errorlevel% & goto :cmDone
:cmerrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
C:\Users\king\output\Data.cpp
C:\Users\king\output\Data-cyclone.c
C:\Users\king\output\DataSplDcps.cpp
C:\Users\king\output\Data.h
C:\Users\king\output\Data-cyclone.h
C:\Users\king\output\Data_Dcps.hpp
C:\Users\king\output\DataSplDcps.h
附加依赖
C:/Users/king/Source/test/Data.idl
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。