aboutsummaryrefslogtreecommitdiff
path: root/tests/cc/modules/common.testscript
blob: 76c9145be2c4f1a1db2b4e3fb2714a958cc67e4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# file      : tests/cc/modules/common.testscript
# license   : MIT; see accompanying LICENSE file

crosstest = false
test.arguments = config.cxx=$quote($recall($cxx.path) $cxx.config.mode)

.include ../../common.testscript

+cat <<EOI >+build/bootstrap.build
using test
EOI

+cat <<EOI >=build/root.build
using in

using cxx.guess

# Force modules.
#
cxx.std = experimental
cxx.features.symexport = true

# @@ TMP revise
if ($cxx.id == 'gcc')
  cxx.features.modules = true

using cxx

hxx{*}: extension = hxx
mxx{*}: extension = mxx
cxx{*}: extension = cxx

cxx.poptions =+ "-I$out_root" "-I$src_root"

if ($cxx.target.class == 'windows')
  bmis{*}: cxx.poptions += '-DLIBFOO_EXPORT=__declspec(dllexport)'

exe{*}: test = true
EOI

# Determine if we have modules and header units support.
#
+$* noop <<EOI | set modules
print $cxx.features.modules
EOI

+$* noop <<EOI | set headers
print ($cxx.features.modules && $cxx.id == 'gcc')
EOI

# @@ TMP: modules support is broken in MinGW GCC (symexport).
#
#\
if ($cxx.target.class == 'windows' && $cxx.id == 'gcc')
  modules = false
  headers = false
end
#\