On 30.05.21 03:39, Edward Diener via Boost wrote:
I do not see how specifying a -G some_generator chooses a compiler. I assume each generator has its own way of choosing a compiler but I can not find any CMake documentation for how to determine this for the command line. Is this something programmers just guess at or is there actual documentation on how what command line parameters configure a particular generator for a particular compiler ? I am being a bit facetious but I am truly amazed at how anyone uses CMake on Windows with any generator which is not Visual C++. Even with the Visual C++ generators I can not find any documentation for the specific -T toolsets, not that I would want to choose any but the default anyway, for a given Visual C++ generator. Anyone ?
To specify a specific compiler in CMake, use -D CMAKE_CXX_COMPILER or -D CMAKE_TOOLCHAIN_FILE. This should work in any generator that isn't tied to a specific compiler. -- Rainer Deyke (rainerd@eldwood.com)