在Linux x86_64系统中编译mission

以下在ubuntu18.10 + gcc8.3编译通过。

安装编译工具:

bash 复制代码
sudo apt install build-essential
sudo apt install cmake

重命名以下目录中的`wsf_module`为`wsf_module-`(子目录的不用管)以屏蔽图形界面相关的模块:

bash 复制代码
swdev/src/engage
swdev/src/evt_reader
swdev/src/mover_creator
swdev/src/mystic
swdev/src/post_processor
swdev/src/sensor_plot
swdev/src/warlock
swdev/src/weapon_tools
swdev/src/wizard

如果没有装好gtest,把相关的测试从CMakeLists.txt中移除,这是最省事编译最快的方式。

修改以下文件,注释其中的`add_subdirectory(test)`:

bash 复制代码
swdev/src/tools/util/CMakeLists.txt
swdev/src/tools/util_script/CMakeLists.txt
swdev/src/tools/artificer/CMakeLists.txt
swdev/src/tools/geodata/CMakeLists.txt
swdev/src/tools/profiling/CMakeLists.txt
swdev/src/wsf_plugins/wsf_p6dof/p6dof/CMakeLists.txt
swdev/src/wsf_plugins/wsf_coverage/CMakeLists.txt
swdev/src/wsf_plugins/wsf_multiresolution/CMakeLists.txt
swdev/src/wsf_plugins/wsf_air_combat/CMakeLists.txt
swdev/src/core/wsf_parser/CMakeLists.txt
swdev/src/core/sensor_plot_lib/CMakeLists.txt
swdev/src/core/wsf/CMakeLists.txt
swdev/src/core/wsf_cyber/CMakeLists.txt
swdev/src/core/wsf_mil/CMakeLists.txt
swdev/src/core/wsf_space/CMakeLists.txt

修改swdev/src/mission/CMakeLists.txt,注释以下行:

bash 复制代码
install_tests(tests ${PROJECT_NAME})
generate_wsf_auto_test(${PROJECT_NAME})
generate_wsf_regression_test(${PROJECT_NAME})

修改swdev/src/core/wsf_nx/CMakeLists.txt,注释以下行:

bash 复制代码
install_tests(test_sensor_plot ${_project_install_dir})

修改swdev/src/core/wsf_space/CMakeLists.txt,注释以下行:

bash 复制代码
install_tests(test ${_project_install_dir})

编译与安装:

bash 复制代码
cd <swdev所在目录>
mkdir builds
cd builds
cmake ../swdev/src
make -j4
make install
相关推荐
贵州诚鑫致达科技有限公司8 小时前
Linux的yum源怎么重启?源不是服务
linux·运维·服务器
澜山奕秋11 小时前
RHCSA
linux·运维·服务器
Web极客码12 小时前
告别流式截断:我用客户端中间件解决长文本 API 跨国 SSE 断连与数据自愈
linux·agent 图
cnnews12 小时前
Chromebox3安装Ubuntu后内存化与最小化 eMMC 写入优化
linux·运维·ubuntu
flytalei13 小时前
Ubuntu 24.04 单节点 K3s 部署实践:从环境评估到故障排查与验收
linux·运维·ubuntu
Starry-sky(jing)13 小时前
Hermes Agent 部署后怎么升级?v0.21.7 Linux 源代码版实测
linux·人工智能·ai agent·版本升级·hermes agent
水饺编程13 小时前
第2章:Linux 基础,clear 命令
linux·c语言·汇编
GeW14 小时前
新质生产力路线图Linux和数据库自主可控实践指南
linux
yunwei3714 小时前
eBPF 教程:BPF 迭代器用于内核数据导出
linux·后端·性能优化
别动我齐刘海15 小时前
实时控制学习2
linux·c++·人工智能·学习·算法