当我执行 CMake 时,我在 CMake 构建目录中使用以下命令,它工作得非常好。
cmake -DCMAKE_TOOLCHAIN_FILE="path/to/toolchain/file" -G "Unix Makefiles" -DCMAKE_MAKE_PROGRAM="path/to/make/program" "path/to/folder/with/cmake/file"
当我设置服务器时,我做了以下请求。
[== "CMake Server" ==[
{"cookie":"yummy","type":"handshake","protocolVersion":{"major":1}, "sourceDirectory":"path/to/folder/with/cmake/file","buildDirectory":"path/to/build/directory",
"generator":"Unix Makefiles"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"type":"configure", "cacheArguments":["-DCMAKE_TOOLCHAIN_FILE=path/to/toolchain/file", "-DCMAKE_MAKE_PROGRAM=path/to/make/program"]}
]== "CMake Server" ==]
我得到的回应是。
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"The C compiler identification is unknown","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"CMake Error: Could not find cmake module file: ./intermediate/cmake/CMakeFiles/3.10.2/CMakeCCompiler.cmake","title":"Error","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"The CXX compiler identification is unknown","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"CMake Error: Could not find cmake module file: ./intermediate/cmake/CMakeFiles/3.10.2/CMakeCXXCompiler.cmake","title":"Error","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"Check for working C compiler: C:/keep/SDK/sysroots/x86_64-pokysdk-mingw32/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-gcc.exe","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:37 (try_compile):\n Unknown extension \".c\" for file\n\n ./intermediate/cmake/CMakeFiles/CMakeTmp/testCCompiler.c\n\n try_compile() works only for enabled languages. Currently these are:\n\n C CXX\n\n See project() command to enable other languages.\nCall Stack (most recent call first):\n C:/temp/test/My.Company.Product/CMakeLists.txt:3 (project)\n\n","title":"Error","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"Check for working C compiler: C:/keep/SDK/sysroots/x86_64-pokysdk-mingw32/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-gcc.exe -- broken","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message):\n The C compiler\n\n \"C:/keep/SDK/sysroots/x86_64-pokysdk-mingw32/usr/bin/arm-pxc-linux-gnueabi/arm-pxc-linux-gnueabi-gcc.exe\"\n\n is not able to compile a simple test program.\n\n It fails with the following output:\n\n \n\n \n\n CMake will not be able to correctly generate this project.\nCall Stack (most recent call first):\n C:/temp/test/My.Company.Product/CMakeLists.txt:3 (project)\n\n","title":"Error","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","progressCurrent":1000,"progressMaximum":1000,"progressMessage":"Configuring","progressMinimum":0,"type":"progress"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","inReplyTo":"configure","message":"Configuring incomplete, errors occurred!\nSee also \"./intermediate/cmake/CMakeFiles/CMakeOutput.log\".\nSee also \"./intermediate/cmake/CMakeFiles/CMakeError.log\".","type":"message"}
]== "CMake Server" ==]
[== "CMake Server" ==[
{"cookie":"","errorMessage":"Configuration failed.","inReplyTo":"configure","type":"error"}
]== "CMake Server" ==]
似乎发生了根本性的错误。我错过了什么?是否可以使用工具链文件配置服务器?