2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-02 20:52:13 +00:00
Files
build/test/dependency-test/foo.jam
Vladimir Prus 41e33cd9f0 Patch from Andre Hentz.
get os=cygwin/toolset=msvc to pass the tests

* new/msvc.jam
  (link): create a CYGWIN-specific version (assumes bash and cygpath)
  (archive): convert paths from unix-style to nt-style
  (init): use platform-independent paths

* test/dependency-test/foo.jam
  add __declspec if CYGWIN and not GCC


[SVN r18224]
2003-04-10 09:49:31 +00:00

34 lines
805 B
Plaintext

import type ;
import generators ;
import os ;
type.register FOO : foo ;
generators.register-standard foo.foo : FOO : CPP H ;
rule foo ( targets * : sources * : properties * )
{
# On NT, you need an exported symbol in order to have an import lib generated
if [ os.name ] = NT && <main-target-type>LIB in $(properties)
{
.decl = "echo void __declspec(dllexport) foo(){}" ;
}
if [ modules.peek : OS ] in CYGWIN && <main-target-type>LIB in $(properties) && $toolset != gcc
{
.decl = "echo 'void __declspec(dllexport) foo(){}'" ;
}
.decl1 on $(<) = $(.decl:E="echo //") ;
# Further files must be touched also; NT doesn't have a touch command
.decl2 on $(<) = "
echo // > " ;
}
actions foo
{
$(.decl1) > $(<[1]) $(.decl2)$(<[2-])
}