티스토리 뷰

https://developer0hye.tistory.com/entry/Github-Actions-windows-latest-msvc-version

 

[Github Actions] windows-latest msvc version

20230128 일자를 기준으로 Visual Studio 2017, 2019, 2022 별 최신 컴파일러가 설치돼있다. https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B Microsoft Visual C++ - Wikipedia From Wikipedia, the free encyclopedia Integrated development

developer0hye.tistory.com

 

Github Action 갖고놀다 보니까 제공해주는 windows-latest 서버에 MSVC 컴파일러가 3개가 설치된 것을 확인하였다.

 

 

근데 여기서 CMake로 프로젝트 Generate/빌드시에 뭐 쓸지 어떻게 고르지...? 

 

찾아보니 CMake 에 -T 라는 옵션이 있었고, 이걸로 Generator를 설정할 수 있었다. 

 

https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-T

 

cmake(1) — CMake 3.25.2 Documentation

Create or extract a tar or zip archive. Options are: New in version 3.15: The command now continues adding files to an archive even if some of the files are not readable. This behavior is more consistent with the classic tar tool. The command now also pars

cmake.org

https://cmake.org/cmake/help/latest/generator/Visual%20Studio%2017%202022.html#toolset-selection

 

Visual Studio 17 2022 — CMake 3.25.2 Documentation

Visual Studio 17 2022 Generates Visual Studio 17 (VS 2022) project files. Project Types Only Visual C++ and C# projects may be generated (and Fortran with Intel compiler integration). Other types of projects (JavaScript, Powershell, Python, etc.) are not s

cmake.org

https://stackoverflow.com/a/73584287

 

Using "Visual Studio 15 2017" compiler in Visual Studio 2022 IDE

I have recently downloaded the Visual Studio 2022 IDE. During installation, I selected "Desktop development with C++" and "MSVC v141 - VS 2017 C++ x64/x86 build tools" (as answe...

stackoverflow.com

방법

20230128 Github Actions native winodws-latest 서버 기준

-T v141 붙이면 Visual Studio 2017 14.16 1916
-T v142 붙이면 Visual Studio 2019 14.29 1929
-T v143 붙이면 Visual Studio 2022 14.34 1934

 

로 아래 명령어처럼 Generator를 지정해주면 된다. blahblah 는 별뜻없다.

cmake -G "Visual Studio 17 2022" -T v142 blahblah

 

예시

아래 프로젝트에 actions script 작성에 활용됨

 

https://github.com/developer0hye/Modern-Cpp-NMS

 

GitHub - developer0hye/Modern-Cpp-NMS: A Modern C++ implementation of NMS

A Modern C++ implementation of NMS. Contribute to developer0hye/Modern-Cpp-NMS development by creating an account on GitHub.

github.com

이제 Test 까지 구축해보자!

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함