You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-10Lines changed: 19 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,39 +7,48 @@
7
7
```toml
8
8
[project]
9
9
name = "cmkr_for_beginners"
10
-
description = "A minimal cmkr project."
11
10
12
11
[target.hello_world]
13
12
type = "executable"
14
13
sources = ["src/main.cpp"]
15
14
```
16
15
17
-
`cmkr` can bootstrap itself from CMake and consumers of your project do not need to install anything to work with it.
16
+
`cmkr` can bootstrap itself from CMake and you only need CMake to use it.
18
17
19
18
## Getting started
20
19
21
-
The easiest way to get started is to use the [cmkr_for_beginners](https://github.com/build-cpp/cmkr_for_beginners) template repository. Either open it in [Gitpod](https://gitpod.io/#https://github.com/build-cpp/cmkr_for_beginners), or clone the repository and run:
20
+
To get started run the following commands from your project directory:
After the bootstrapping process finishes, modify [`cmake.toml`](https://build-cpp.github.io/cmkr/cmake-toml) and open the project in your favorite IDE or build with CMake:
22
28
23
29
```sh
24
30
cmake -B build
25
31
cmake --build build
26
32
```
27
33
28
-
Alternatively you can check out the [cmkr topic](https://github.com/topics/cmkr), the [build-cpp organization](https://github.com/build-cpp) or the [tests](https://github.com/build-cpp/cmkr/tree/main/tests) for more examples and templates. You can also check out the [documentation](https://build-cpp.github.io/cmkr).
34
+
Once bootstrapped, `cmkr` does not introduce extra steps to your workflow. After modifying `cmake.toml` you simply build/configure your CMake project and `cmkr` will automatically regenerate `CMakeLists.txt`.
29
35
30
-
### Migrating an existing project
36
+
In CI settings the `cmkr` bootstrapping process is skipped so there is no extra configure-time overhead in your pipelines.
31
37
32
-
When migrating an existing project it's easiest to download a [cmkr release](https://github.com/build-cpp/cmkr/releases) and put `cmkr` in your PATH. Then go to your project directory and run:
38
+
## Template repositories
33
39
34
-
```
35
-
cmkr init
40
+
Another way to get started is to use the [cmkr_for_beginners](https://github.com/build-cpp/cmkr_for_beginners) template repository. Either open it in [Gitpod](https://gitpod.io/#https://github.com/build-cpp/cmkr_for_beginners), or clone the repository and run:
41
+
42
+
```sh
43
+
cmake -B build
44
+
cmake --build build
36
45
```
37
46
38
-
This will bootstrap `cmake.toml` and `CMakeLists.txt` that you can then build as normal with CMake.
47
+
Check out the [cmkr topic](https://github.com/topics/cmkr), the [build-cpp organization](https://github.com/build-cpp) or the [tests](https://github.com/build-cpp/cmkr/tree/main/tests) for more examples and templates.
39
48
40
49
## Command line
41
50
42
-
Optionally you can install `cmkr` in your `PATH` and use it as a utility from the command line:
51
+
Optionally you can put a [`cmkr` release](https://github.com/build-cpp/cmkr/releases) in your `PATH` and use it as a utility from the command line:
Copy file name to clipboardExpand all lines: docs/cmake-toml.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
---
2
2
layout: page
3
-
title: cmake.toml
3
+
title: Reference
4
4
permalink: /cmake-toml/
5
-
nav_order: 3
5
+
nav_order: 1
6
6
---
7
7
8
-
# cmake.toml
8
+
# Reference
9
9
10
-
This page is supposed to be a reference for the options in the `cmake.toml` file. If you think anything is missing or unclear, please [edit this page](https://github.com/build-cpp/cmkr/edit/main/docs/cmake-toml.md) or open an [issue](https://github.com/build-cpp/cmkr/issues).
10
+
This page is a reference for the options in the `cmake.toml` file. If you think anything is missing or unclear, please [edit this page](https://github.com/build-cpp/cmkr/edit/main/docs/cmake-toml.md) or open an [issue](https://github.com/build-cpp/cmkr/issues).
11
11
12
-
See the [examples](/examples) section for more real-world examples.
12
+
See the [examples](/examples) section for concrete examples.
13
13
14
14
## CMake configuration
15
15
@@ -132,7 +132,7 @@ tag = "v0.1"
132
132
[target.mytarget]
133
133
condition = "linux"
134
134
alias = "mytarget::mytarget"
135
-
type = "static"# executable, library, shared, static, interface, custom
After the bootstrapping process finishes, modify [`cmake.toml`](https://build-cpp.github.io/cmkr/cmake-toml) and open the project in your favorite IDE or build with CMake:
34
+
35
+
```sh
36
+
cmake -B build
37
+
cmake --build build
38
+
```
39
+
40
+
Once bootstrapped, `cmkr` does not introduce extra steps to your workflow. After modifying `cmake.toml` you simply build/configure your CMake project and `cmkr` will automatically regenerate `CMakeLists.txt`.
41
+
42
+
In CI settings the `cmkr` bootstrapping process is skipped so there is no extra configure-time overhead in your pipelines.
43
+
44
+
## Template repositories
45
+
46
+
Another way to get started is to use the [cmkr_for_beginners](https://github.com/build-cpp/cmkr_for_beginners) template repository. Either open it in [Gitpod](https://gitpod.io/#https://github.com/build-cpp/cmkr_for_beginners), or clone the repository and run:
47
+
48
+
```sh
49
+
cmake -B build
50
+
cmake --build build
51
+
```
52
+
53
+
Check out the [cmkr topic](https://github.com/topics/cmkr), the [build-cpp organization](https://github.com/build-cpp) or the [tests](https://github.com/build-cpp/cmkr/tree/main/tests) for more examples and templates.
54
+
55
+
## Command line
56
+
57
+
Optionally you can put a [`cmkr` release](https://github.com/build-cpp/cmkr/releases) in your `PATH` and use it as a utility from the command line:
58
+
59
+
```
60
+
Usage: cmkr [arguments]
61
+
arguments:
62
+
init [executable|library|shared|static|interface] Starts a new project in the same directory.
63
+
gen Generates CMakeLists.txt file.
64
+
build <extra cmake args> Run cmake and build.
65
+
install Run cmake --install. Needs admin privileges.
0 commit comments