Comments (6)
@benschreiber Thank you for your github issue! We followed the command you provided to reproduce the issue, but we encountered error below, in order to better reproduce and solve your issue, could you provide us with your reproduction steps video and reproduction file?
from vscode-cmake-tools.
It looks like you are on windows? Then you can modify the preset to use MSVC and the VS Generator. But it would be easier to just try to reproduce on Linux or in WSL.
from vscode-cmake-tools.
@Yingzi1234 If you're still stuck, try using this devcontainer.json
{
"image": "mcr.microsoft.com/devcontainers/cpp:debian-12",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools"
]
}
}
}
from vscode-cmake-tools.
@benschreiber Thanks for your reply, based on the latest information you provided, we tried to reproduce your issue on a Linux machine, but are not sure if we got the same results as your issue. When I run the "CMake: configure" command, an error box pops up, but when I go to the output window, the contents show that my configuration was successful. Here's a recording of my reproduction for you to check out.
GitHub issue.webm
from vscode-cmake-tools.
@Yingzi1234 Yes, that is the same behavior I see. I know that the configure step was successful, but the error box should not pop up.
from vscode-cmake-tools.
Hi @gcampbell-msft, based on customer repro steps we can reproduced this issue on Linux platform(Configuration was successful but an error box appears), you can get the details below and we have been changed the issue's status to "Bug" if it is incorrect, could you help change it to the correct label? Thank you in advance!
ENV:
- Platform: Linux
- CMake tools: v1.17.17
- VScode: 1.89.1
Repro steps:
- Create a folder on desktop and open it by VScode
- Create a CMakeLists.txt file and paste the following into it
cmake_minimum_required(VERSION 3.27)
project(foo)
enable_testing()
file(CONFIGURE
OUTPUT ${PROJECT_BINARY_DIR}/createTestLabels.cmake
CONTENT "execute_process(COMMAND @CMAKE_COMMAND@ -E echo \"Generating test labels...\")\n"
@ONLY
)
set_property(DIRECTORY APPEND PROPERTY
TEST_INCLUDE_FILES ${PROJECT_BINARY_DIR}/createTestLabels.cmake
)
- Create a CMakePresets.json file and paste the following into it
{
"version": 6,
"configurePresets": [
{
"name": "gcc-debug",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"cacheVariables": {
"CMAKE_CXX_COMPILER": "g++",
"CMAKE_BUILD_TYPE": "Debug"
},
"generator": "Unix Makefiles"
}
],
"buildPresets": [
{
"name": "gcc-debug",
"configurePreset": "gcc-debug"
}
],
"testPresets": [
{
"name": "gcc-debug",
"configurePreset": "gcc-debug"
}
]
}
- Create a devcontainer.json file and paste the following into it
{
"image": "mcr.microsoft.com/devcontainers/cpp:debian-12",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools"
]
}
}
}
- After saving all, click F1 to run "CMake: configure" command
Actual result:
It shows that "Configuring done" and "Generating done" but pops up with an error message: "Unexpected token 'G', "Generating"... is not valid JSON"
GitHub issue.webm
from vscode-cmake-tools.
Related Issues (20)
- usepresets context is not set after using quickstart HOT 4
- Investigate passing multiple workspace browse configurations (1 for each target+fileGroup combo) to C/C++ extension HOT 4
- After clicking Run Tests an error is reported HOT 1
- FR: Make it easier to setup a launch configuration with CMake Tools HOT 3
- presets: setting cmake.buildToolArgs in configuration leads to build failures HOT 3
- FR: support the terminal.integrated.automationProfile.* when launch target without debug
- The test process will remain loaded after clicking “Debug Tests” HOT 3
- Annoying unnecessary logging related to expanding strings that don't require expansion
- Doubling of cpack arguments via package preset
- Need to clean-configure when running workflow with workflow-configure-preset different than project-configure-preset
- Fix UI issues in the CMake left panel related to package preset override of settings
- Improve CMakeLists.txt support - auto formatting and auto add to CMakeLists.txt when adding files HOT 1
- Selecting CMake Tools as configuration provider has error squiggles for all standard library includes HOT 3
- IntelliSense picks up wrong include path and shows false-positive error squiggles HOT 3
- Intellisense Suddenly Stopped Working For Standard Headers & Included Directories HOT 5
- Edit CacheUI broken since last release? HOT 1
- Filename not mentioned in error HOT 3
- VSCODE reports symbols not found, while jump to declaration works correctly. HOT 8
- Extension display language not right HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cmake-tools.