cppcoro/lib/build.cake
Lewis Baker 12ba2c4567 Add initial build system based on cake.
Supports building using VS 2015 compiler and generating .vcproj files
for Visual Studio 2015.
2017-04-01 22:09:04 +10:30

47 lines
837 B
CoffeeScript

import cake.path
from cake.tools import compiler, script, env, project
includes = cake.path.join(env.expand('${CPPCORO}'), 'include', 'cppcoro', [
'broken_promise.hpp',
'task.hpp',
'single_consumer_event.hpp',
])
sources = script.cwd([
])
extras = script.cwd([
'build.cake',
'use.cake',
])
buildDir = env.expand('${CPPCORO_BUILD}')
compiler.addIncludePath(env.expand('${CPPCORO}/include'))
objects = compiler.objects(
targetDir=env.expand('${CPPCORO_BUILD}/obj'),
sources=sources,
)
lib = compiler.library(
target=env.expand('${CPPCORO_LIB}/cppcoro'),
sources=objects,
)
vcproj = project.project(
target=env.expand('${CPPCORO_PROJECT}/cppcoro'),
items={
'Include': includes,
'Source': sources,
'': extras
},
output=lib,
)
script.setResult(
project=vcproj,
library=lib,
)