
If I configure and build the project in CLion's Terminal using the same commands CLion shows me when configuring and building the project, I can use MSVC 7.0. If I use CLion GUI to configure or build the project or to do both things, it uses MSVC 9.0. When I create a variable int x, the debugger shows that x equals 1931.
#Clion blog code#
Also, I can set up the project in Terminal to use the newer toolset (which is the default) and have the 1933 printed.Īlso, when I debug the code using CLion, the Evaluate says that _MSC_VER is 1933 but the application still prints 1931. The strange part is that I get the correct result using Terminal even after configuring the project using CLion GUI. When I configure the project (no matter with CLion or manually) and build it using CLion GUI, I get the answer 1933Īlthough, if I use the same command as CLion, namely "C:\Program Files\CMake\bin\cmake.exe" -build F:\test_project\build -target test_project -config Debug When I remove the latest toolset using Visual Studio Installer, it also automatically removes C++ CMake Tools for Windows, which doesn't allow me to use CMake with Visual Studio. Specifying C and C++ compilers for the toolchain (File | Settings | Build, Execution, Deployment | Toolchains) doesn't help. So I conclude that something goes wrong.Īfter this, I can modify the project and execute the "Reload CMake Project", and CLion does it well because the versions of compilers are already configured. Note: toolset 3 contains MSVC 7.0 while toolset 9 contains MSVC 9.0. The CXX compiler identification is MSVC 7.0 or & prefix), I get what I want - The C compiler identification is MSVC 7.0 When I clear the cache directory and execute the same command in CLion Terminal (copy and paste it with the. The CXX compiler identification is MSVC 9.0 Nevertheless, logs say - The C compiler identification is MSVC 9.0 The command executed is "C:\Program Files\CMake\bin\cmake.exe" -G "Visual Studio 17 2022" -T version=14.31.17.1 -S F:\test_project -B F:\test_project\build From the article: A new CLion 2022.2 EAP3, 222.2889.11, is available from our website, via the Toolbox App, or as a snap package (if you are using Ubuntu).
#Clion blog generator#
In CLion, I specify generator Visual Studio 2022 and a toolset 14.31.17.1. CLion 2022.2 EAP3: CMakeCache Editor, Symbol Servers for Debug, Evaluation of Constant Values in the Editor. I configure the CMake project with a CMakeLists.txt file project(test_project) I want to use the toolset of version 14.31.17.1, which is older than the newest one. I use CLion 2022.2, Visual Studio 2022, and CMake 3.23.
