Skip to content

Commit

Permalink
Add draft of README, docs, and license
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpalmisc committed Dec 25, 2022
1 parent 7e133a5 commit 2d24c15
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
26 changes: 26 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright (c) 2022 Jon Palmisciano

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60 changes: 60 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Emake

Emake is an easy wrapper around CMake's CLI. It is meant to speed up the process
of configuring and building a CMake-based project from the command line. It
provides a user experience that smells vaguely like Autotools.

## Tutorial

> A small tour of Emake is offered below; see `emake -h` and `econf -h` for comprehensive help.
In most cases, all you need to do to configure and build a project is simply run
`emake` by itself:

```sh
emake # Configure project (if needed), then build
```

> For simple projects, this will work 99% of the time.
If you wish to build a specific target, you may specify its name:

```sh
emake test # Configure project (if needed), then build the `test` target
```

Sometimes you'll need to pass more arguments to CMake's configure step, as is
usual with larger, more complex projects. A project can be configured
(without building) using the `econf` tool. Once again, in the most simple case,
simply run `econf` by itself:

```sh
econf # Configure the project (if needed)
```

Additional arguments can be passed through to CMake as follows:

```sh
econf -- -DCMAKE_BUILD_TYPE=Release
```

### Settings

Configuration and build settings can also be sourced from `emake.toml` in the
current working directory.

```toml
[configure]
generator = "Ninja"
```

Running `econf` with the following `emake.toml` present will cause Ninja to be
used as the CMake generator by default. For a full sample configuration, see
[`sample.toml`](docs/sample.toml).

## License

Copyright © 2022 Jon Palmisciano. All rights reserved.

Use of this source code is governed by the BSD 3-Clause license; a full copy of
the license can be found in the [LICENSE.txt](LICENSE.txt) file.
6 changes: 6 additions & 0 deletions docs/sample.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[configure]
args = ["-DFOO=1", "-DBAR=0"]
generator = "Ninja"

[build]
jobs = 6
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "emake"
version = "0.1.0"
description = "Easy wrapper around CMake's CLI"
authors = ["Jon Palmisciano <[email protected]>"]
readme = "README.md"
license = "BSD-3-Clause"
repository = "https://github.com/jonpalmisc/emake"

[tool.poetry.scripts]
emake = "emake.cli.emake:main"
Expand Down

0 comments on commit 2d24c15

Please sign in to comment.