在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
相关推荐
largecode5 小时前
怎么让手机显示公司名?来电显示公司名称认证实现品牌外显
linux·ubuntu·华为od·华为·智能手机·华为云·harmonyos
祁白_5 小时前
跨平台通用危险函数深度解析
linux·windows·笔记·安全·系统命令
柿柿快乐5 小时前
用户认证系统实现文档
linux·服务器·网络·学习·基础教学
南境十里·墨染春水5 小时前
linux学习进展 Redis详解
linux·redis·学习
岳来5 小时前
linux 设备目录/dev 学习
linux·服务器·/dev
红茶要加冰5 小时前
三、条件测试
linux·运维·服务器
韩明君5 小时前
Debian12安装RabittMQ 4.3.0
linux·debian·高并发·debian12·rabittmq
未来超低端科技研究所5 小时前
大恒工业相机c#开发,NET8跨平台使用(armlinux和x86linux)
linux·c#·工业相机·net8·大恒图像·跨平台开发
Languorous.5 小时前
Linux 系统安装 MySQL(CentOS8/Ubuntu),命令行实操完整版
linux·mysql·ubuntu
_童年的回忆_5 小时前
【Linux】安装Jenkins并且打包发布springboot项目
linux·spring boot·jenkins