-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add draft of README, docs, and license
- Loading branch information
1 parent
7e133a5
commit 2d24c15
Showing
4 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|