This tool is currently experimental, and possibly not useful, examine at your own risk. check out (not my project) https://conan.io if you need c++ dependency management today
- npm for c++, (but not really because scripting vs symbols, em i rite?)
- native code runs fast, is safe, saves electricity
- fetch
- git branches or tarballs
- configure
- create / replace / files ala autotools "config.h.in"
- generate ninja or cmake files
- or use directly those things i.e cmake --configure
- build
- with ninja
- easily override all cFlags / cxxFlags
- install
- automagically aggregates headers and libs, but can override for specific copying
- no 'make install' everything is stored locally, and dependencies include locally
- test
- run tests -- not implemented yet
other things of note
- can be run directly on mac / win / linux with node
- can use docker run 1e1f/tmake (if linux host environment is ok)
host: yaml configs as json in a central repo cache: store static_libs + headers against config hash clang cross-compile and dynamic support for different toolchain / sysroot
- always be cross-compiling
- statically link all the things
- declarative yaml / json only, no imperative configuration logic
- can override settings in any dependency from any point below it in the config tree
- cascading selectors make configuration as DRY as possible
- support other build tools (ninja, cmake, make, gyp)
- be embeddable in another project / build system
- avoid use of any globals on dev machine, project folder is the universe
- no explicit publication of built source, just pull a hash if it exists
npm install -g tmake
Trying to make this as automatic as possible
depends on node fetches most other aspects of the toolchain, except for git + cmake (presently)
- nodejs - https://nodejs.org/en/
- build tools
- ninja - will be automatically installed locally
- cmake - https://cmake.org https://www.google.com/search?client=safari&rls=en&q=install+cmake&ie=UTF-8&oe=UTF-8
- some build tools i.e.
- xcode on mac
- build-essentials on linux
- maybe works on windows? (i haven't checked yet)
mkdir tmake-example && cd tmake-example
tmake example served
tmake
./build/example_served &
curl http://127.0.0.1:8080/hello
a simple cross platform zlib config
---
git:
repository: madler/zlib
tag: v1.2.8
configure:
replace:
gzguts:
matching:
- "gzguts.h"
inputs:
unistd:
- "#ifdef _LARGEFILE64_SOURCE"
- "#include <unistd.h>\n#ifdef _LARGEFILE64_SOURCE"
build:
with: ninja
sources:
matching:
- "*.c"
compilerFlags:
ios:
miphoneos-version-min: "=6.0"
cFlags:
O: 3
Wall: true
Wwrite-strings: true
Wpointer-arith: true
Wconversion: true
ios:
"fembed-bitcode": true
see 'warning' at the top, update this project is ALMOST useful now, please holler at [email protected] if you're interested in this project
(Nothing yet)
Copyright (c) 2016 1e1f Licensed under the MIT license.