parent
fbe968f817
commit
cf748514fb
@ -1,72 +0,0 @@
|
|||||||
---
|
|
||||||
permalink: /assets/js/search-data.json
|
|
||||||
---
|
|
||||||
{
|
|
||||||
{%- assign i = 0 -%}
|
|
||||||
{%- assign pages_array = '' | split: '' -%}
|
|
||||||
{%- assign pages_array = pages_array | push: site.html_pages -%}
|
|
||||||
{%- if site.just_the_docs.collections -%}
|
|
||||||
{%- for collection_entry in site.just_the_docs.collections -%}
|
|
||||||
{%- assign collection_key = collection_entry[0] -%}
|
|
||||||
{%- assign collection_value = collection_entry[1] -%}
|
|
||||||
{%- assign collection = site[collection_key] -%}
|
|
||||||
{%- if collection_value.search_exclude != true -%}
|
|
||||||
{%- assign pages_array = pages_array | push: collection -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- for pages in pages_array -%}
|
|
||||||
{%- for page in pages -%}
|
|
||||||
{%- if page.title and page.search_exclude != true -%}
|
|
||||||
{%- assign page_content = page.content -%}
|
|
||||||
{%- assign heading_level = site.search.heading_level | default: 2 -%}
|
|
||||||
{%- for j in (2..heading_level) -%}
|
|
||||||
{%- assign tag = '<h' | append: j -%}
|
|
||||||
{%- assign closing_tag = '</h' | append: j -%}
|
|
||||||
{%- assign page_content = page_content | replace: tag, '<h1' | replace: closing_tag, '</h1' -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- assign parts = page_content | split: '<h1' -%}
|
|
||||||
{%- assign title_found = false -%}
|
|
||||||
{%- for part in parts offset: 1 -%}
|
|
||||||
{%- assign titleAndContent = part | split: '</h1>' -%}
|
|
||||||
{%- assign title = titleAndContent[0] | replace_first: '>', '<h1>' | split: '<h1>' -%}
|
|
||||||
{%- assign title = title[1] | strip_html -%}
|
|
||||||
{%- assign content = titleAndContent[1] -%}
|
|
||||||
{%- assign url = page.url -%}
|
|
||||||
{%- if title == page.title and parts[0] == '' -%}
|
|
||||||
{%- assign title_found = true -%}
|
|
||||||
{%- else -%}
|
|
||||||
{%- assign id = titleAndContent[0] -%}
|
|
||||||
{%- assign id = id | split: 'id="' -%}
|
|
||||||
{%- if id.size == 2 -%}
|
|
||||||
{%- assign id = id[1] -%}
|
|
||||||
{%- assign id = id | split: '"' -%}
|
|
||||||
{%- assign id = id[0] -%}
|
|
||||||
{%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- unless i == 0 -%},{%- endunless -%}
|
|
||||||
"{{ i }}": {
|
|
||||||
"doc": {{ page.title | jsonify }},
|
|
||||||
"title": {{ title | jsonify }},
|
|
||||||
"content": {{ content | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
|
|
||||||
"url": "{{ url | absolute_url }}",
|
|
||||||
"relUrl": "{{ url }}"
|
|
||||||
}
|
|
||||||
{%- assign i = i | plus: 1 -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- unless title_found -%}
|
|
||||||
{%- unless i == 0 -%},{%- endunless -%}
|
|
||||||
"{{ i }}": {
|
|
||||||
"doc": {{ page.title | jsonify }},
|
|
||||||
"title": {{ page.title | jsonify }},
|
|
||||||
"content": {{ parts[0] | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
|
|
||||||
"url": "{{ page.url | absolute_url }}",
|
|
||||||
"relUrl": "{{ page.url }}"
|
|
||||||
}
|
|
||||||
{%- assign i = i | plus: 1 -%}
|
|
||||||
{%- endunless -%}
|
|
||||||
{%- endif -%}
|
|
||||||
{%- endfor -%}
|
|
||||||
{%- endfor %}
|
|
||||||
}
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
layout: page
|
|
||||||
title: Building
|
|
||||||
permalink: /building/
|
|
||||||
nav_order: 1
|
|
||||||
---
|
|
||||||
|
|
||||||
# Building
|
|
||||||
|
|
||||||
cmkr requires a C++11 compiler, cmake >= 3.15.
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone https://github.com/build-cpp/cmkr
|
|
||||||
cd cmkr
|
|
||||||
cmake -Bbin
|
|
||||||
cmake --build bin --parallel
|
|
||||||
```
|
|
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: Command line
|
||||||
|
permalink: /command-line/
|
||||||
|
nav_order: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
## Command line
|
||||||
|
|
||||||
|
Optionally you can install `cmkr` in your `PATH` and use it as a utility from the command line:
|
||||||
|
|
||||||
|
```
|
||||||
|
Usage: cmkr [arguments]
|
||||||
|
arguments:
|
||||||
|
init [executable|library|shared|static|interface] Starts a new project in the same directory.
|
||||||
|
gen Generates CMakeLists.txt file.
|
||||||
|
build <extra cmake args> Run cmake and build.
|
||||||
|
install Run cmake --install. Needs admin privileges.
|
||||||
|
clean Clean the build directory.
|
||||||
|
help Show help.
|
||||||
|
version Current cmkr version.
|
||||||
|
```
|
After Width: | Height: | Size: 109 KiB |
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: Getting started
|
||||||
|
permalink: /getting-started/
|
||||||
|
nav_order: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cmake -B build
|
||||||
|
cmake --build build
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively you can check out the [cmkr topic](https://github.com/topics/cmkr) or the [build-cpp organization](https://github.com/build-cpp) for more examples and templates.
|
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 1.4 KiB |
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
layout: home
|
|
||||||
nav_order: 0
|
|
||||||
---
|
|
||||||
|
|
||||||
# cmkr
|
|
||||||
|
|
||||||
cmkr, pronounced "cmaker", is A CMakeLists.txt generator from TOML.
|
|
||||||
|
|
||||||
See the [cmkr topic](https://github.com/topics/cmkr) for examples. Feel free to add the `cmkr` topic to your projects if you used cmkr!
|
|
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
layout: home
|
||||||
|
title: Index
|
||||||
|
nav_order: 0
|
||||||
|
---
|
||||||
|
|
||||||
|
# Index
|
||||||
|
|
||||||
|
`cmkr`, pronounced "cmaker", is a modern build system based on [CMake](https://cmake.org/) and [TOML](https://toml.io). It was originally created by [Mohammed Alyousef](https://github.com/MoAlyousef).
|
||||||
|
|
||||||
|
**NOTE**: The documentation is currently a work-in-progress due to breaking changes since `0.1.4`. For examples you can check the [cmkr GitHub topic](https://github.com/topics/cmkr) and the [tests](https://github.com/build-cpp/cmkr/tree/main/tests).
|
||||||
|
|
||||||
|
`cmkr` parses `cmake.toml` files and generates a modern, idiomatic `CMakeLists.txt` for you. A minimal example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[project]
|
||||||
|
name = "cmkr_for_beginners"
|
||||||
|
description = "A minimal cmkr project."
|
||||||
|
|
||||||
|
[target.hello_world]
|
||||||
|
type = "executable"
|
||||||
|
sources = ["src/main.cpp"]
|
||||||
|
```
|
||||||
|
|
||||||
|
`cmkr` can bootstrap itself from CMake and consumers of your project do not need to install anything to use it.
|
@ -1,45 +0,0 @@
|
|||||||
---
|
|
||||||
layout: page
|
|
||||||
title: Usage
|
|
||||||
permalink: /usage/
|
|
||||||
nav_order: 2
|
|
||||||
---
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
cmkr parses cmake.toml files (using toml11 by Toru Niina) at the project directory. A basic hello world format with the minimum required fields:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[cmake]
|
|
||||||
minimum = "3.15"
|
|
||||||
|
|
||||||
[project]
|
|
||||||
name = "app"
|
|
||||||
version = "0.1.0"
|
|
||||||
|
|
||||||
[target.app]
|
|
||||||
type = "executable"
|
|
||||||
sources = ["src/main.cpp"]
|
|
||||||
```
|
|
||||||
|
|
||||||
**NOTE**: The documentation is currently a work-in-progress due to breaking changes since `0.1.4`. For examples you can check the [cmkr topic](https://github.com/topics/cmkr).
|
|
||||||
|
|
||||||
The cmkr executable can be run from the command-line:
|
|
||||||
|
|
||||||
```
|
|
||||||
Usage: cmkr [arguments]
|
|
||||||
arguments:
|
|
||||||
init [executable|library|shared|static|interface] Starts a new project in the same directory.
|
|
||||||
gen Generates CMakeLists.txt file.
|
|
||||||
build <extra cmake args> Run cmake and build.
|
|
||||||
install Run cmake --install. Needs admin privileges.
|
|
||||||
clean Clean the build directory.
|
|
||||||
help Show help.
|
|
||||||
version Current cmkr version.
|
|
||||||
```
|
|
||||||
|
|
||||||
The build command invokes cmake and the default build-system on your platform (unless a generator is specified), it also accepts extra cmake build arguments:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cmkr build --config Release
|
|
||||||
```
|
|
Loading…
Reference in new issue