aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo/testdata/flags.go
blob: d52bbc5b9631041ecfebedd75e127ba467521212 (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
package main

/*
// this name doesn't exist
#cgo  NOFLAGS: -foo

// unknown flag
#cgo CFLAGS: -fdoes-not-exist -DNOTDEFINED

#cgo CFLAGS: -DFOO

#cgo CFLAGS: -Iinclude
#include "foo.h"

#if defined(FOO)
#define BAR 3
#else
#define BAR 5
#endif

#if defined(NOTDEFINED)
#warning flag must not be defined
#endif
*/
import "C"

var (
	_ = C.BAR
	_ = C.FOO_H
)