티스토리 뷰
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 까지 구축해보자!
'CMake' 카테고리의 다른 글
[CMake] 실행파일(.exe) 생성되는 폴더 경로 변수 (0) | 2023.01.03 |
---|---|
CMake 실행 파일 생성 위치 정의 (0) | 2022.09.18 |
[CMake] Generator 목록 확인 명령어 (0) | 2022.09.12 |
Modern Cmake tutorial 자료 (0) | 2022.08.31 |
[CMake] 빌드시 파일 복사 붙여넣기 (0) | 2022.06.12 |
- Total
- Today
- Yesterday
- 자료구조
- C++ Deploy
- cosine
- 백준 1766
- PyCharm
- LCA
- MOT
- 조합
- 순열
- 백준
- 가장 긴 증가하는 부분 수열
- 백준 11437
- 위상 정렬 알고리즘
- ㅂ
- 문제집
- Lowest Common Ancestor
- 이분탐색
- 백준 11053
- 인공지능을 위한 선형대수
- 단축키
- 백트래킹
- 파이참
- FairMOT
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |