mirror of https://gitlab.com/ita1024/waf.git
Add an example for compiling with msvc
This commit is contained in:
parent
29c20e3e30
commit
9f8d8eb66e
|
@ -0,0 +1,11 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
(void)argc;
|
||||||
|
(void)argv;
|
||||||
|
|
||||||
|
puts("This is a simple test program.\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
top = '.'
|
||||||
|
out = 'build'
|
||||||
|
|
||||||
|
def options(opt):
|
||||||
|
opt.load('msvc')
|
||||||
|
|
||||||
|
def configure(cfg):
|
||||||
|
cfg.load('msvc')
|
||||||
|
cfg.load('msvc_pdb')
|
||||||
|
cfg.env.append_value('CFLAGS','/Zi')
|
||||||
|
cfg.env.append_value('LDFLAGS','/DEBUG')
|
||||||
|
|
||||||
|
def build(bld):
|
||||||
|
bld.program(
|
||||||
|
name='test',
|
||||||
|
source=['test.c'],
|
||||||
|
target='test',
|
||||||
|
use='CRT_MULTITHREADED_DLL')
|
Loading…
Reference in New Issue