1

CMakeLists.txt:

set(CMAKE_C_COMPILER "C:\\Strawberry\\c\\bin\\g++.exe")
set(CMAKE_CXX_COMPILER "C:\\Strawberry\\c\\bin\\g++.exe")

but when assembling cmake ../ I get:

 Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000.
-- The C compiler identification is MSVC 19.30.30706.0
-- The CXX compiler identification is MSVC 19.30.30706.0

How do I change the compiler?

Barev
  • 11
  • 3
  • On Stack Overflow questions and answers should be in **English**. If you are able to translate the question into English (and ready to get English answers) then do that. Otherwise you could ask on https://ru.stackoverflow.com/. – Tsyvarev Apr 09 '22 at 20:39
  • @Tsyvarev sorry, i mixed up the domains – Barev Apr 09 '22 at 22:06
  • How are your `set` commands ordered with `project()` call? Have you checked [that question](https://stackoverflow.com/questions/45933732/how-to-specify-a-compiler-in-cmake) and its answers? – Tsyvarev Apr 09 '22 at 22:24
  • You change it correctly, now remove CMakeCache.txt and run it again explicitly specifying a suitable generator, for example `cmake -G Ninja ..` – ixSci Apr 10 '22 at 05:32

0 Answers0