-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] CMake Presets Can Not Work Well with Clion Under Visual Studio 2022 17.11.5 #17281
Comments
Another question : Do I really need to set up "compiler.cppstd" , it seems like this attribute can be compatible with "14" "17" "20" |
Yes, it is very recommended in Conan 2. The default |
I am not sure what is happening, but I tend to think there is a CLion bug. The You might be able to test things without CLion, just with CMake in the command line and see for example how Conan will map the I think the problem is CLion trying to activate the environment is doing:
Because it might have a direct mapping from |
You are right, I think may be it's Clion bug. I just don't know how to fix it . I just don't know how to report to Clion. Thanks. |
I'm experiencing the same issue. |
Hi @ah-meng, as described above, this seems a limitation/bug in CLion/CMake, not in Conan. |
Describe the bug
[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=17
compiler.runtime=dynamic
compiler.version=194
os=Windows
How to reproduce it
First I usually develop projects with IDE Clion. Conan is always my first choice of c++ package manager. And the generator is always visual studio.
Yesterday I update my visual studio vs2022 from 17.9.4 to 17.11.5. I found out that the clion can't reload the cmake project.
Here are the steps:
Failed to launch CMake executable 'C:\Users\harry\AppData\Local\Programs\CLion Nova\bin\cmake\win\x64\bin\cmake.exe': Cannot load Visual C++ environment from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat:
command [C:\WINDOWS\system32\cmd.exe, /c, "call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 1>&2 && "C:\Users\harry\AppData\Local\Programs\CLion Nova\jbr\bin\java" -cp "C:\Users\harry\AppData\Local\Programs\CLion Nova\lib\util_rt.jar" com.intellij.util.ReadEnv > C:\Users\harry\AppData\Local\Temp\intellij-cmd-env-data.13203864965847733922.tmp || exit /B %ERRORLEVEL%"], exit code: 0 Configure Disable profile
[ERROR:vcvars.bat] Toolset directory for version '14.3' was not found.
[ERROR:VsDevCmd.bat] *** VsDevCmd.bat encountered errors. Environment may be incomplete and/or incorrect. ***
[ERROR:VsDevCmd.bat] In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run
[ERROR:VsDevCmd.bat] vsdevcmd.bat [args] for additional details.
[ERROR:VsDevCmd.bat] Where [value] is:
[ERROR:VsDevCmd.bat] 1 : basic debug logging
[ERROR:VsDevCmd.bat] 2 : detailed debug logging
[ERROR:VsDevCmd.bat] 3 : trace level logging. Redirection of output to a file when using this level is recommended.
[ERROR:VsDevCmd.bat] Example: set VSCMD_DEBUG=3
[ERROR:VsDevCmd.bat] vsdevcmd.bat > vsdevcmd.trace.txt 2>&1
The text was updated successfully, but these errors were encountered: