Я создал задачу в моем tasks.json
файле в Visual Studio. Код:
{
"label": "cmake",
"command": "cmake",
"args": [
"-G",
"\"Unix Makefiles\"",
"-DCMAKE_BUILD_TYPE=Debug",
".."
],
"options": {
"cwd": "${workspaceRoot}/build"
},
"problemMatcher": []
},
Когда я запускаю его из VSC (Задачи: запустить задачу> cmake), я получаю следующую ошибку:
> Executing task: cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. <
CMake Error: Could not create named generator "Unix Makefiles"
Generators
Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files.
Xcode = Generate Xcode project files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
CodeLite - Ninja = Generates CodeLite project files.
CodeLite - Unix Makefiles = Generates CodeLite project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
Kate - Ninja = Generates Kate project files.
Kate - Unix Makefiles = Generates Kate project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files.
The terminal process terminated with exit code: 1
Однако, если я выполняю ту же самую команду в терминале, она работает как ожидалось:
oyvinds-MacBook:build oyvindhauge$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..-- Configuring done
-- Generating done
-- Build files have been written to: /Users/oyvindhauge/Documents/Development/[PROJECT]/build
oyvinds-MacBook:build oyvindhauge$
Есть идеи, что происходит?