skvadrik / re2c

Lexer generator for C, C++, Go and Rust.
https://re2c.org
Other
1.09k stars 170 forks source link

cmake .. cant build in vs2019 #373

Closed yangjian1218 closed 2 years ago

yangjian1218 commented 3 years ago

I have loaded down re2c-2.2-release and re2c-2.2-release.I found it has build dir in filedir, so I mkdir build_dir when I do "cmake .." ,there is a erro: PS D:\YJYJ\re2c-2.2\build_dir> cmake .. -- Building for: Visual Studio 15 2017 -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22000. CMake Error at CMakeLists.txt:2 (project): Failed to run MSBuild command:

MSBuild.exe

to get the value of VCTargetsPath:

So I change to :cmake .. -G"Visual Studio 16 Win64" But It only highly support to vs 15 2017 :

CMake Error: Could not create named generator Visual Studio 16 Win64

Generators Visual Studio 15 2017 [arch] = Generates Visual Studio 2017 project files. Optional [arch] can be "Win64" or "ARM". Visual Studio 14 2015 [arch] = Generates Visual Studio 2015 project files. Optional [arch] can be "Win64" or "ARM". Visual Studio 12 2013 [arch] = Generates Visual Studio 2013 project files.

sergeyklay commented 3 years ago

I'll check this ASAP (most likely this week).

sergeyklay commented 3 years ago

@yangjian1218 Did you try vs2019 or vs2017? In issue header "cant build in vs2019" but in the provided logs "Building for: Visual Studio 15 2017"

sergeyklay commented 3 years ago

CMake Error: Could not create named generator Visual Studio 16 Win64

Do you have installed Visual Studio 2019? Also as far as I understand you have used CMake 3.13, but support of Visual Studio 16 2019 generator was first introduced for CMake 3.14 version.

skvadrik commented 2 years ago

Closing due to lack of information.