CMake automatically looks for v140 (VS2015) compiler on Windows, and now only VS2013 IDE, so to modify the compiler
Modify the compiler name of VS2015, error prompt parameter Cmake_c_compiler and cmake_cxx_compiler parameter corresponding address cannot find
These two variables are explicitly set in CMakeLists.txt, pointing to the path of the VS2013 compiler, which can be compiled
However, after the VS2015 compiler file name is changed back, the changes in the CMakeLists.txt are useless and will be compiled with the default compiler.
I got a look. How to modify the specified compiler correctly on Windows, the main reference is:
https://stackoverflow.com/questions/13054451/unable-to-specify-the-compiler-with-cmake/13089688#13089688
The answer is not to change the parameters directly in the CMakeLists.txt, but to add the environment variables cc and CXX, or the command line with the-D parameter assignment
About Pytorch A collection of issues for editing on Windows