我是 Qt Creator 的新手,想将现有的 CMake 项目导入其中。我将 CMakeLists.txt 文件作为项目加载,运行 CMake 后,它找到了我希望的文件。
但是当它构建时,它似乎在一秒钟后过早结束。这是日志:
17:11:46: Running steps for project My-GUI...
17:11:46: Starting: "C:\Program Files\JetBrains\CLion 2017.1.3\bin\cmake\bin\cmake.exe" --build . --target clean
17:11:46: Starting: "C:\Program Files\JetBrains\CLion 2017.1.3\bin\cmake\bin\cmake.exe" --build . --target spectrumSaver
"C:\Program Files\JetBrains\CLion 2017.1.3\bin\cmake\bin\cmake.exe" -HC:\Users\user\WorkingFiles\Excellims\My-GUI -BC:\Users\user\WorkingFiles\Excellims\build-My-GUI-Desktop_Qt_5_9_0_MSVC2015_64bit-Default --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\Makefile2 /nologo -L spectrumSaver
"C:\Program Files\JetBrains\CLion 2017.1.3\bin\cmake\bin\cmake.exe" -HC:\Users\user\WorkingFiles\Excellims\My-GUI -BC:\Users\user\WorkingFiles\Excellims\build-My-GUI-Desktop_Qt_5_9_0_MSVC2015_64bit-Default --check-build-system CMakeFiles\Makefile.cmake 0
"C:\Program Files\JetBrains\CLion 2017.1.3\bin\cmake\bin\cmake.exe" -E cmake_progress_start C:\Users\user\WorkingFiles\Excellims\build-My-GUI-Desktop_Qt_5_9_0_MSVC2015_64bit-Default\CMakeFiles 7
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\Makefile2 /nologo -L CMakeFiles\spectrumSaver.dir\all
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f shared\CMakeFiles\shared.dir\build.make /nologo -L shared\CMakeFiles\shared.dir\depend
"C:\Program Files\JetBrains\CLion 2017.1.3\bin\cmake\bin\cmake.exe" -E cmake_depends "NMake Makefiles" C:\Users\user\WorkingFiles\Excellims\My-GUI C:\Users\user\WorkingFiles\My-GUI\src\shared C:\Users\user\WorkingFiles\My-GUI\build-My-GUI-Desktop_Qt_5_9_0_MSVC2015_64bit-Default C:\Users\user\WorkingFiles\My-GUI\build-My-GUI-Desktop_Qt_5_9_0_MSVC2015_64bit-Default\shared C:\Users\user\WorkingFiles\Excellims\build-My-GUI-Desktop_Qt_5_9_0_MSVC2015_64bit-Default\shared\CMakeFiles\shared.dir\DependInfo.cmake --color=
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f shared\CMakeFiles\shared.dir\build.make /nologo -L shared\CMakeFiles\shared.dir\build
[ 28%] Built target shared
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f CMakeFiles\spectrumSaver.dir\build.make /nologo -L CMakeFiles\spectrumSaver.dir\depend
17:11:47: Elapsed time: 00:01.
您可以看到 CMake 报告构建完成 28%,就在结束之前。
我找不到有关此的任何信息,而且我所有的摆弄还没有解决它。我正在使用 CMake 3.7.2(CLion 附带),但我也使用了 CMake 3.8.2(独立安装)。这是在 Windows 7 上,Qt Creator 4.3.0 使用 Microsoft Visual C++ 2015 编译器。