-
Notifications
You must be signed in to change notification settings - Fork 273
/
Copy pathgenerate_vcxproj
executable file
·63 lines (47 loc) · 2.44 KB
/
generate_vcxproj
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
59
60
61
62
63
#/bin/bash
dest=..
if ! [ -e $dest/src/Makefile ] ; then echo Makefile not found ; exit 1; fi
echo Generating Visual Studio Project files in $dest
function doit {
echo Generating $dest/$1.vcxproj
cat vcxproj.1 > $dest/$1.vcxproj
# this collects all the files needed
echo " <ItemGroup>" >> $dest/$1.vcxproj
for dir in $dirs ; do
sources="`(cd $dest/src/$dir; make sources)`"
for s in $sources ; do
if [ "$s" = "goto_instrument_main.cpp" ] && [ "$1" != "goto-instrument" ] ; then
continue
fi
echo " <ClCompile Include=\"src\\${dir}\\${s}\"/>" >> $dest/$1.vcxproj
done
done
echo " <ClCompile Include=\"minisat-2.2.1\\minisat\\core\\Solver.cc\"/>" >> $dest/$1.vcxproj
echo " <ClCompile Include=\"minisat-2.2.1\\minisat\\simp\\SimpSolver.cc\"/>" >> $dest/$1.vcxproj
echo " </ItemGroup>" >> $dest/$1.vcxproj
cat vcxproj.2 >> $dest/$1.vcxproj
echo Generating $dest/$1.vcxproj.filters
# this produces nice "filters" (folders)
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $dest/$1.vcxproj.filters
echo "<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">" >> $dest/$1.vcxproj.filters
echo " <ItemGroup>" >> $dest/$1.vcxproj.filters
for dir in $dirs ; do
sources="`(cd $dest/src/$dir; make sources)`"
for s in $sources ; do
echo " <ClCompile Include=\"src\\${dir}\\${s}\"><Filter>${dir}</Filter></ClCompile>" >> $dest/$1.vcxproj.filters
done
done
echo " <ClCompile Include=\"minisat-2.2.1\\minisat\\core\\Solver.cc\"><Filter>minisat2</Filter></ClCompile>" >> $dest/$1.vcxproj.filters
echo " <ClCompile Include=\"minisat-2.2.1\\minisat\\simp\\SimpSolver.cc\"><Filter>minisat2</Filter></ClCompile>" >> $dest/$1.vcxproj.filters
echo " </ItemGroup>" >> $dest/$1.vcxproj.filters
for dir in $dirs minisat2 ; do
echo " <ItemGroup><Filter Include=\"${dir}\"/></ItemGroup>" >> $dest/$1.vcxproj.filters
done
echo "</Project>" >> $dest/$1.vcxproj.filters
}
dirs="big-int langapi util ansi-c assembler cpp json json-symtab-language xmllang solvers goto-symex analyses pointer-analysis goto-programs linking goto-checker goto-instrument cbmc"
doit cbmc
dirs="big-int langapi util ansi-c assembler cpp json xmllang goto-programs linking goto-cc"
doit goto-cc
dirs="big-int langapi util ansi-c assembler cpp json xmllang solvers goto-symex analyses pointer-analysis goto-programs linking goto-instrument"
doit goto-instrument