Closed wjk closed 1 year ago
Thanks for the report! I'm not quite sure what's going on here, but I have a few suggestions. Can you try setting cmake.skipConfigureWhenCachePresent: true
in your settings.json
file? I realized this is an undocumented flag (we'll get on that) but it should stop the extension from trying to reconfigure if there's already a cache present (from your configure.sh
script).
Also, how are you currently configuring the extension? I noticed that you're not using CMakePresets, so can you provide the values of all the cmake.*
settings in settings.json
and what kit and variant you have selected (if known)?
Unfortunately, your suggestion did nothing. Here is my settings.json
:
{
"cmake.buildDirectory": "${workspaceFolder}/output-MinGW-i386",
"cmake.skipConfigureWhenCachePresent": true,
"cmake.configureArgs": [
"-DCMAKE_TOOLCHAIN_FILE:FILENAME=${workspaceFolder}/toolchain-gcc.cmake",
"-DARCH:STRING=i386"
],
"cmake.buildTask": true,
"cmake.clearOutputBeforeBuild": false,
"cmake.cmakePath": "/opt/RosBE-2.2.1/bin/cmake",
"cmake.loggingLevel": "info"
}
I am using an automatically detected kit that picks up a specific crosscompiler, installed for me in /opt/RosBE-2.2.1
. These tools were prepended to my PATH before running configure.sh
. I am running a Debug build, if that is what you mean. Thanks!
Did not mean to close, sorry!
"cmake.automaticReconfigure": false
maybe this config can give help with you.
This apparently works fine now.
Brief Issue Summary
I am using a project that requires a cross-compiler. I have installed the compiler, as well as a specific (tested) build of CMake. I configure my project by running the
configure.sh
script in the repo root from the Terminal. This configure succeeds, as does any build.However, when I then load VSCode, I get the output below. Apparently, it thinks that I am using a compiler targeting Windows to develop a program to be run on macOS. This is clearly nonsensical.
After this happens, my build directory is corrupted and unrecoverable. Nothing I do — even deleting CMakeCache.txt and the CMakeFiles directory — will convince it to configure properly. The only thing I can do is to close VSCode, delete the build directory, and reconfigure using the script again. This of course results in my losing all my incremental-build products (and ReactOS takes a very long time to build fully). Worse, when I reopen VSCode, it does corrupts my build directory again.
This only started happening very recently, perhaps after a VSCode update. I am on version 1.77.1.
CMake Tools Diagnostics
Debug Log
Additional Information
No response