Skip to content

Commit 0660a08

Browse files
committed
update md
1 parent 3ae4c94 commit 0660a08

2 files changed

Lines changed: 212 additions & 38 deletions

File tree

README.ko.md

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
2+
# `Conan` 프로젝트 빌드 명령
3+
4+
> [English](README.md)
5+
6+
## 사전 설치 항목
7+
- `Windows` : **Visual Studio** <sub> (2022 or higher) </sub>, **cmake**, **ninja**
8+
- `Linux` : **gcc** <sub> (g++) </sub>, **cmake**, **ninja**
9+
10+
<br />
11+
12+
## 프로젝트 설정
13+
- `conanfile.txt` 파일 생성
14+
```ini
15+
[requires]
16+
boost/1.84.0
17+
18+
[options]
19+
boost/*:shared=False
20+
21+
[generators]
22+
CMakeToolchain
23+
CMakeDeps
24+
```
25+
26+
- 위의 경우 boost 버전 1.84.0 을 사용
27+
28+
<br />
29+
30+
## `Visual Studio 2022`
31+
32+
- 코난 프로필 파일을 사전에 생성한다.
33+
34+
<br />
35+
36+
- 릴리즈 빌드를 위한 설정 파일 생성: `C:\Users\<user>\.conan2\profiles\msvc_release` (`<user>`는 개인 계정)
37+
```ini
38+
[settings]
39+
os=Windows
40+
arch=x86_64
41+
build_type=Release
42+
compiler=msvc
43+
compiler.version=194
44+
compiler.runtime=dynamic
45+
compiler.runtime_type=Release
46+
compiler.cppstd=17
47+
48+
[conf]
49+
tools.cmake.cmaketoolchain:generator=Ninja
50+
```
51+
- `compiler.version`
52+
- Visual Studio 버전+ 제품 버전(MSVC Toolset), `Conan compiler.version`
53+
- `Visual Studio 2026`, `195`
54+
- `Visual Studio 2022 17.10~`, `194`
55+
- `Visual Studio 2022 17.0~17.9`, `193`
56+
- `Visual Studio 2019`, `192`
57+
- `Visual Studio 2017`, `191`
58+
- `Visual Studio 2015`, `190`
59+
- `cl` 명령을 입력하면 표시되는 버전의 상위 3자리 값: 예> 19.50.35725 이면 195 를 사용
60+
61+
<br />
62+
63+
- 디버깅 빌드를 위한 설정 파일 생성: `C:\Users\<user>\.conan2\profiles\msvc_debug`
64+
```ini
65+
[settings]
66+
os=Windows
67+
arch=x86_64
68+
build_type=Debug
69+
compiler=msvc
70+
compiler.version=194
71+
compiler.runtime=dynamic
72+
compiler.runtime_type=Debug
73+
compiler.cppstd=17
74+
75+
[conf]
76+
tools.cmake.cmaketoolchain:generator=Ninja
77+
```
78+
79+
<br />
80+
81+
---
82+
83+
- `Visual Studio`인 경우 `Release` 빌드 절차
84+
```sh
85+
# msvc cmd 에서 다음과 같은 명령들을 실행한다.
86+
87+
cmake -E rm -rf build-msvc-release
88+
# build-msvc 디렉터리를 존재 여부와 관계없이, 하위 내용까지 전부 삭제
89+
90+
conan install . ^
91+
-pr:h %USERPROFILE%\.conan2\profiles\msvc_release ^
92+
-pr:b default ^
93+
-of build-msvc-release ^
94+
--build=missing
95+
# conan install . : 현재 디렉터리(.)에 있는 conanfile.txt 또는 conanfile.py를 기준
96+
# -pr:h %USERPROFILE%\.conan2\profiles\msvc_release : host profile 지정
97+
# -pr:b default : 보통 host와 동일하면 default를 사용
98+
# -of build-msvc-release : Conan이 생성하는 파일들을 build-msvc-release 디렉터리에 출력
99+
# --build=missing : 로컬 캐시에 없는 패키지는 소스에서 빌드. 이미 캐시에 있으면 빌드하지 않음.
100+
101+
cmake -S . ^
102+
-B build-msvc-release ^
103+
-DCMAKE_TOOLCHAIN_FILE=build-msvc\conan_toolchain.cmake ^
104+
-G "Visual Studio 17 2022"
105+
# -S . : 현재 디렉터리(.)에 CMakeLists.txt가 있음
106+
# -B build-msvc : CMake 결과물을 build-msvc에 생성
107+
# -DCMAKE_TOOLCHAIN_FILE=build-msvc\conan_toolchain.cmake :
108+
109+
cmake --build build-msvc-release --config Release
110+
# --build build-msvc-release : build-msvc-release 경로 빌드
111+
# --config Release : 프로필 파일(msvc_release)에 Release로 설정된 경우, 릴리즈로 빌드하여야 함.
112+
```
113+
114+
<br />
115+
116+
- `Visual Studio`인 경우 `Debug` 빌드 절차
117+
```sh
118+
cmake -E rm -rf build-msvc-debug
119+
120+
conan install . ^
121+
-pr:h %USERPROFILE%\.conan2\profiles\msvc_debug ^
122+
-pr:b default ^
123+
-of build-msvc-debug ^
124+
--build=missing
125+
126+
cmake -S . -B build-msvc-debug ^
127+
-DCMAKE_TOOLCHAIN_FILE=build-msvc-debug\conan_toolchain.cmake ^
128+
-G "Visual Studio 17 2022"
129+
130+
cmake --build build-msvc-debug --config Debug
131+
```
132+
133+
<br />
134+
135+
---
136+
137+
## `Rocky Linux 8 x86_64`
138+
139+
- 릴리즈 빌드를 위한 설정 파일 생성: `/home/<user>/.conan2/profiles/linux_gcc_release`
140+
```ini
141+
[settings]
142+
os=Linux
143+
arch=x86_64
144+
compiler=gcc
145+
compiler.version=8
146+
compiler.libcxx=libstdc++11
147+
build_type=Release
148+
149+
[conf]
150+
tools.cmake.cmaketoolchain:generator=Ninja
151+
```
152+
153+
<br />
154+
155+
- `gcc/linux` 에서 `Release` 빌드
156+
```sh
157+
cmake -E rm -rf build-linux-gcc-release
158+
159+
conan install . \
160+
-pr:h ~/.conan2/profiles/linux_gcc_release \
161+
-pr:b default \
162+
-of build-linux-gcc-release \
163+
--build=b2* \
164+
--build=missing
165+
# b2의 종속성 문제가 있을 경우를 대비하여 b2도 빌드함
166+
167+
cmake -S . \
168+
-B build-linux-gcc-release \
169+
-DCMAKE_TOOLCHAIN_FILE=build-linux-gcc/conan_toolchain.cmake \
170+
-G "Unix Makefiles" \
171+
-DCMAKE_BUILD_TYPE=Release
172+
173+
cmake --build build-linux-gcc-release --config Release
174+
```
175+
176+
177+
178+
179+
180+
181+

README.md

Lines changed: 31 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
# Conan Project Build Commands
12

2-
# `Conan` 프로젝트 빌드 명령
3+
> [Korean](README.ko.md)
34
4-
## 사전 설치 항목
5-
- `Windows` : **Visual Studio** <sub> (2022 or higher) </sub>, **cmake**, **ninja**
6-
- `Linux` : **gcc** <sub> (g++) </sub>, **cmake**, **ninja**
5+
## Prerequisites
6+
- **Windows**: **Visual Studio** <sub>(2022 or higher)</sub>, **cmake**, **ninja**
7+
- **Linux**: **gcc** <sub>(g++)</sub>, **cmake**, **ninja**
78

89
<br />
910

10-
## 프로젝트 설정
11-
- `conanfile.txt` 파일 생성
11+
## Project Setup
12+
- Create a `conanfile.txt` file:
1213
```ini
1314
[requires]
1415
boost/1.84.0
@@ -20,18 +21,17 @@ boost/*:shared=False
2021
CMakeToolchain
2122
CMakeDeps
2223
```
23-
24-
- 위의 경우 boost 버전 1.84.0 을 사용
24+
- In this example, Boost version 1.84.0 is used.
2525

2626
<br />
2727

28-
## `Visual Studio 2022`
28+
## Visual Studio 2022
2929

30-
- 코난 프로필 파일을 사전에 생성한다.
30+
- Create Conan profile files in advance.
3131

3232
<br />
3333

34-
- 릴리즈 빌드를 위한 설정 파일 생성: `C:\Users\<user>\.conan2\profiles\msvc_release` (`<user>`는 개인 계정)
34+
- Create a settings file for release builds: `C:\Users\<user>\.conan2\profiles\msvc_release` (`<user>` is your user account)
3535
```ini
3636
[settings]
3737
os=Windows
@@ -47,18 +47,18 @@ compiler.cppstd=17
4747
tools.cmake.cmaketoolchain:generator=Ninja
4848
```
4949
- `compiler.version`
50-
- Visual Studio 버전+ 제품 버전(MSVC Toolset), `Conan compiler.version`
50+
- Visual Studio version + product version (MSVC Toolset), `Conan compiler.version`
5151
- `Visual Studio 2026`, `195`
5252
- `Visual Studio 2022 17.10~`, `194`
5353
- `Visual Studio 2022 17.0~17.9`, `193`
5454
- `Visual Studio 2019`, `192`
5555
- `Visual Studio 2017`, `191`
5656
- `Visual Studio 2015`, `190`
57-
- `cl` 명령을 입력하면 표시되는 버전의 상위 3자리 값: 예> 19.50.35725 이면 195 를 사용
57+
- The top 3 digits of the version shown by the `cl` command: e.g., if 19.50.35725, use 195
5858

5959
<br />
6060

61-
- 디버깅 빌드를 위한 설정 파일 생성: `C:\Users\<user>\.conan2\profiles\msvc_debug`
61+
- Create a settings file for debug builds: `C:\Users\<user>\.conan2\profiles\msvc_debug`
6262
```ini
6363
[settings]
6464
os=Windows
@@ -78,40 +78,40 @@ tools.cmake.cmaketoolchain:generator=Ninja
7878

7979
---
8080

81-
- `Visual Studio`인 경우 `Release` 빌드 절차
81+
- For `Visual Studio` Release build procedure:
8282
```sh
83-
# msvc cmd 에서 다음과 같은 명령들을 실행한다.
83+
# Run the following commands in the msvc command prompt.
8484

8585
cmake -E rm -rf build-msvc-release
86-
# build-msvc 디렉터리를 존재 여부와 관계없이, 하위 내용까지 전부 삭제
86+
# Deletes the build-msvc directory and all its contents, regardless of existence.
8787

8888
conan install . ^
8989
-pr:h %USERPROFILE%\.conan2\profiles\msvc_release ^
9090
-pr:b default ^
9191
-of build-msvc-release ^
9292
--build=missing
93-
# conan install . : 현재 디렉터리(.)에 있는 conanfile.txt 또는 conanfile.py를 기준
94-
# -pr:h %USERPROFILE%\.conan2\profiles\msvc_release : host profile 지정
95-
# -pr:b default : 보통 host와 동일하면 default를 사용
96-
# -of build-msvc-release : Conan이 생성하는 파일들을 build-msvc-release 디렉터리에 출력
97-
# --build=missing : 로컬 캐시에 없는 패키지는 소스에서 빌드. 이미 캐시에 있으면 빌드하지 않음.
93+
# conan install . : Uses conanfile.txt or conanfile.py in the current directory (.)
94+
# -pr:h %USERPROFILE%\.conan2\profiles\msvc_release : Specify host profile
95+
# -pr:b default : Use default if same as host
96+
# -of build-msvc-release : Output Conan-generated files to build-msvc-release directory
97+
# --build=missing : Build from source if not in local cache; skip if already cached.
9898

9999
cmake -S . ^
100100
-B build-msvc-release ^
101101
-DCMAKE_TOOLCHAIN_FILE=build-msvc\conan_toolchain.cmake ^
102102
-G "Visual Studio 17 2022"
103-
# -S . : 현재 디렉터리(.)에 CMakeLists.txt가 있음
104-
# -B build-msvc : CMake 결과물을 build-msvc에 생성
103+
# -S . : CMakeLists.txt is in the current directory (.)
104+
# -B build-msvc : Generate CMake output in build-msvc
105105
# -DCMAKE_TOOLCHAIN_FILE=build-msvc\conan_toolchain.cmake :
106106

107107
cmake --build build-msvc-release --config Release
108-
# --build build-msvc-release : build-msvc-release 경로 빌드
109-
# --config Release : 프로필 파일(msvc_release)에 Release로 설정된 경우, 릴리즈로 빌드하여야 함.
108+
# --build build-msvc-release : Build the build-msvc-release path
109+
# --config Release : If set to Release in the profile file (msvc_release), build as release.
110110
```
111111

112112
<br />
113113

114-
- `Visual Studio`인 경우 `Debug` 빌드 절차
114+
- For `Visual Studio` Debug build procedure:
115115
```sh
116116
cmake -E rm -rf build-msvc-debug
117117

@@ -132,9 +132,9 @@ cmake --build build-msvc-debug --config Debug
132132

133133
---
134134

135-
## `Rocky Linux 8 x86_64`
135+
## Rocky Linux 8 x86_64
136136

137-
- 릴리즈 빌드를 위한 설정 파일 생성: `/home/<user>/.conan2/profiles/linux_gcc_release`
137+
- Create a settings file for release builds: `/home/<user>/.conan2/profiles/linux_gcc_release`
138138
```ini
139139
[settings]
140140
os=Linux
@@ -150,7 +150,7 @@ tools.cmake.cmaketoolchain:generator=Ninja
150150

151151
<br />
152152

153-
- `gcc/linux` 에서 `Release` 빌드
153+
- For `gcc/linux` Release build:
154154
```sh
155155
cmake -E rm -rf build-linux-gcc-release
156156

@@ -160,7 +160,7 @@ conan install . \
160160
-of build-linux-gcc-release \
161161
--build=b2* \
162162
--build=missing
163-
# b2의 종속성 문제가 있을 경우를 대비하여 b2도 빌드함
163+
# Build b2 as well in case of dependency issues with b2
164164

165165
cmake -S . \
166166
-B build-linux-gcc-release \
@@ -170,10 +170,3 @@ cmake -S . \
170170

171171
cmake --build build-linux-gcc-release --config Release
172172
```
173-
174-
175-
176-
177-
178-
179-

0 commit comments

Comments
 (0)