File: generate_vcxproj

package info (click to toggle)
cbmc 6.6.0-4
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 153,852 kB
  • sloc: cpp: 386,459; ansic: 114,466; java: 28,405; python: 6,003; yacc: 4,552; makefile: 4,041; lex: 2,487; xml: 2,388; sh: 2,050; perl: 557; pascal: 184; javascript: 163; ada: 36
file content (63 lines) | stat: -rwxr-xr-x 2,494 bytes parent folder | download | duplicates (2)
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