Comments (9)
I'm having the same problem. It is making it impossible to use CMake Tools with a conan based project, because conan creates a preset file for CMake to find all its generated CMake modules.
from vscode-cmake-tools.
@nikolaseu @wrightleft Thanks for letting us know, could you all also test the previous official release version before 1.18.41? I'm wanting to understand if this is a regression, or if this is an already present issue. Thanks!
from vscode-cmake-tools.
@nikolaseu For context on why we don't use --preset
, this is for numerous reasons, but the simplest being that the guidance provided by Kitware for IDE integration is to avoid using --preset
. There are additional reasons based on implementation requirements, but that is the simplest one.
from vscode-cmake-tools.
@nikolaseu For context on why we don't use
--preset
, this is for numerous reasons, but the simplest being that the guidance provided by Kitware for IDE integration is to avoid using--preset
. There are additional reasons based on implementation requirements, but that is the simplest one.
Thanks! It's always an issue in Windows, I workaround it by setting the PATH before launching vscode but I need two different envs for debug and release 😞 . QtCreator is better in that sense (without presets at least).
I was hoping CMakePresets would help, since it works from the command line. But I was not using presets before. The previous version probably has the same issue since it's not a bug if I understand you correctly.
Maybe this could be an option? It seems useful to have something that works exactly as the command line.
from vscode-cmake-tools.
@nikolaseu Thank you for reporting this issue. Regarding this issue, we have tried to reproduce the issue using a simple demo project: my_project.zip , but we do not seem to be able to reproduce the issue you mentioned. In order to investigate further, could you please provide us with a simple project that can reproduce this issue. We are looking forward to hearing from you.
ENV:
VSCode:1.90.0
CMake 工具:v1.81.41
C/C++:v1.20.5
from vscode-cmake-tools.
Hi @v-frankwang
That project doesn't need any DLL that is not in the PATH, you don't have any runtime dependency. How are you checking/evaluating if it's using the preset correctly?
I will try to make a basic example.
from vscode-cmake-tools.
Using the x64-release preset in both cases, running ctest fails in vscode but works on command line.
Command line usage (from a VS2022 developer command prompt)
cmake --preset x64-release
cmake --build --preset x64-release --target all
ctest --preset x64-release
from vscode-cmake-tools.
I don't have the regular "Visual Studio" IDE but I'm told this works fine there
from vscode-cmake-tools.
@gcampbell-msft I reproduced the issue based on the project provided by the user, here are the steps to reproduce it:
ENV:
VS Code: 1.90.0
CMake tools: 1.18.42
C/C++:1.20.5
- Download this file:my_project_2.zip and open it in vscode
- Run the command:"CMake:configure"
- Select "x64-release"
- Click on the Testing button in the left navigation bar
Actual result:
Run Test fails when you click Run Test in the Test Explorer window, but succeeds when you run it from the command line.
from vscode-cmake-tools.
Related Issues (20)
- ninja, etc now required on the PATH? HOT 5
- this is not work properly HOT 1
- Expand use of the Problems Panel for CMakePresets errors
- Restore the last selected preset after an error in expanding a presets file HOT 3
- Running CMake Tools always results in an error `[driver] Invalid value to convert to cmake value:` HOT 3
- cmake: cache edit cache not found HOT 4
- Regression with CMake Tools v1.19.28 (pre-release) : it enforces Ninja as generator even if the Ninja tool is not installed HOT 3
- Visual Studio development environment not used for CMake configure HOT 6
- After running CMake: debug it prompts that GDB cannot be found on macos
- Add support for CMake Presets v9 HOT 1
- twxs/vs.language.cmake future HOT 3
- CMakeUserPresets regression HOT 4
- cmake.getLaunchTargetFilename returns nothing (again?) HOT 10
- CMakePresets error including nested presets files HOT 5
- CMakePresets fail to load on RedHat. Error on Output: Invalid variable reference ${which_declare} HOT 6
- why vs code build cmake project output Directory auto add auto ${buildType} HOT 3
- Presets are not reloaded when an included file is changed untile reload HOT 6
- No Debug or Launch Targets with empty Build type HOT 3
- Deletes CMakeCache.txt on file save HOT 10
- Redundant messages appear in the terminal window
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.