cmake - 在 windows 10 中构建 ParaView-Superbuild
问题描述
我正在尝试在 Windows 10 64x 上构建 ParaView-Superbuild ( https://gitlab.kitware.com/paraview/paraview-superbuild )。
我无法让它工作。我只是从错误跑到错误。目前我被困在:
CMake Error at superbuild/projects/win32/boost.cmake:5 (message):
At least Visual Studio 9.0 is required
Call Stack (most recent call first):
superbuild/cmake/SuperbuildMacros.cmake:690 (include)
superbuild/CMakeLists.txt:145 (_superbuild_discover_projects)
使用 Cmake 3.13.10-rc1 作为 Ninja 的生成器。我安装了 Cygwin64 并且正在使用 GCC 编译器
The C compiler identification is GNU 7.3.0
The CXX compiler identification is GNU 7.3.0
由于我认为该错误与编译器有关,因此我尝试切换到已安装的 VS2017 编译器。但是,构建过程随后将崩溃
CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules
/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools
/MSVC/14.15.26726/bin/Hostx86/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/paraview-superbuild/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/Ninja/ninja.exe" "cmTC_915a7"
[1/2] Building C object CMakeFiles\cmTC_915a7.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_915a7.exe
FAILED: cmTC_915a7.exe
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe
--intdir=CMakeFiles\cmTC_915a7.dir --manifests -- C:\PROGRA~2\MICROS~1
\2017\ENTERP~1\VC\Tools\MSVC\1415~1.267\bin\Hostx64\x64\link.exe /nologo
CMakeFiles\cmTC_915a7.dir\testCCompiler.c.obj /out:cmTC_915a7.exe
/implib:cmTC_915a7.lib /pdb:cmTC_915a7.pdb /version:0.0 /machine:x64
/debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib
winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
advapi32.lib && cd ."
RC Pass 1: command "rc /foCMakeFiles\cmTC_915a7.dir/manifest.res
CMakeFiles\cmTC_915a7.dir/manifest.rc" failed (exit code 0) with the
following output:
The system cannot find the file specified
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (
当 VS 完全不工作时,我不知道如何使用 GCC 编译器修复错误。遗憾的是,我在 Paraview 网站上找不到任何帮助。
有人设法建造它并且可以一步一步地告诉我如何去做吗?
不,我不想在这里使用 Linux。
谢谢。
解决方案
这是在 Windows 上构建 ParaView Superbuild 的可靠方法
- 使用所有 C++ 相关工具安装 Visual Studio 2013 社区
- 安装 cmake
- 安装 git bash
- 安装忍者
- 安装 Qt 5.9.2 VS2013
- 安装其他潜在的依赖项
- 打开 git bash
然后 :
cd C:/
mkdir pv
cd pv
git clone git@gitlab.kitware.com:paraview/paraview-superbuild.git
mv paraview-superbuild pvsb
mkdir pvsb_b
cd pvsb
git submodule update --init --recursive
- 打开 Visual Studio 原生命令 X64
然后 :
cd C:\pv\pvsb_b
cmake-gui
- 根据您的需要配置 paraview-superbuild
- ENABLE_qt5 和 USE_SYSTEM_qt 应该是 ON
- 产生
- 关闭 cmake-gui
ninja
推荐阅读
- python - 从 Visual Studio 更改 jupyter-lab 中的 Conda 环境
- python - 如何将输入附加到 lst(但列表必须满足某些参数)
- html-webpack-plugin - 如何在模板中包含脚本标签而不解析“src”
- node.js - Jasmine 找不到节点类型
- python - 在 django 中将数据从 csv 文件导入到带有外键的表中
- throw - 如何在没有 Google-Earth-Engine 中的 if 语句的参数检查期间抛出错误?
- c# - 如何将 Java 递归服务重写为 .Net 5?
- reactjs - useContext 挂钩返回未定义
- javascript - 如何使用关键字数组过滤列表?
- javascript - 如何在 Angular HTML 中添加 JS