I fail to use the command line to configure, reporting errors as “The C compiler identification is unknown and The CXX compiler identification is unknown”.
But for the same project, it is successful when using the cmake-gui. My cmake version is 3.20.4.
report information like:
Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
The C compiler identification is MSVC 19.16.27045.0
The CXX compiler identification is MSVC 19.16.27045.0
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working C compiler: D:/Program Files/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
Detecting C compile features
Detecting C compile features - done
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Check for working CXX compiler: D:/Program Files/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe - skipped
Detecting CXX compile features
Detecting CXX compile features - done
operation system is Windows-10.0.19042
Found OpenMP_C: -openmp (found version “2.0”)
Found OpenMP_CXX: -openmp (found version “2.0”)
Found OpenMP: TRUE (found version “2.0”)
Anyone could help? I don’t know why there is a difference in my vs2017 build and how to solve it in command-line way.