mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 19:30:04 +01:00
728205fe3c
For ELF binaries (e.g., Linux): default compatible version (SONAME = `<library-name>.so.<MAJOR>`) can be specialized using additional `cnum` parameter to `<library-name>.so.<MAJOR>.<MINOR>` or `<library-name>.so.<MAJOR>.<MINOR>.<PATCH>`. For Mach-O binaries (e.g., OS X): - (bugfix) install-name points to compatible version (not absolute path to a non-versioned library) - Default install-name `<install-path>/<library-name>.<MAJOR>.dylib` can be specialized using `cnum` parameter to `<install-path>/<library-name>.<MAJOR>.<MINOR>.dylib` or `<install-path>/<library-name>.<MAJOR>.<MINOR>.<PATCH>.dylib` - `-Wl,-compatibility_version` and `-Wl,-current_version` flags use version from cnum/vnum (default cnum is vnum.split('.')[0])
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
#! /usr/bin/env python
|
|
# encoding: utf-8
|
|
# Thomas Nagy, 2006-2010 (ita)
|
|
|
|
# the following two variables are used by the target "waf dist"
|
|
VERSION='0.0.1'
|
|
APPNAME='cxx_test'
|
|
|
|
# these variables are mandatory ('/' are converted automatically)
|
|
top = '.'
|
|
out = 'build'
|
|
|
|
def options(opt):
|
|
opt.load('compiler_cxx')
|
|
|
|
def configure(conf):
|
|
conf.load('compiler_cxx')
|
|
conf.check(header_name='stdio.h', features='cxx cxxprogram', mandatory=False)
|
|
|
|
def build(bld):
|
|
bld.shlib(source='a.cpp', target='mylib', vnum='9.8.7')
|
|
bld.shlib(source='a.cpp', target='mylib2', vnum='9.8.7', cnum='9.8')
|
|
bld.shlib(source='a.cpp', target='mylib3')
|
|
bld.program(source='main.cpp', target='app', use='mylib')
|
|
bld.stlib(target='foo', source='b.cpp')
|
|
|
|
# just a test to check if the .c is compiled as c++ when no c compiler is found
|
|
bld.program(features='cxx cxxprogram', source='main.c', target='app2')
|
|
|
|
if bld.cmd != 'clean':
|
|
from waflib import Logs
|
|
bld.logger = Logs.make_logger('test.log', 'build') # just to get a clean output
|
|
bld.check(header_name='sadlib.h', features='cxx cxxprogram', mandatory=False)
|
|
bld.logger = None
|
|
|