Skip to content

Update generate_vcxproj to work with current source tree #4678

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions buildspec-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ phases:
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -j4 -C jbmc/src setup-submodules" && bash -c "make CXX=clcache.exe -j4 -C jbmc/src BUILD_ENV=MSVC" '
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make CXX=clcache.exe -j4 -C jbmc/unit all BUILD_ENV=MSVC" '

- |
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
$env:CLCACHE_DIR = "C:\clcache"
$env:CLCACHE_BASEDIR = (Get-Item -Path ".\").FullName
cmd /c 'bash -c "cd scripts ; ./generate_vcxproj"'
$env:Path = "C:\Program Files (x86)\MSBuild\14.0\Bin;$env:Path"
msbuild /p:CLToolExe=clcache.exe /m:4 cbmc.vcxproj

- |
# display cache stats
$env:Path = "C:\tools\cygwin\bin;c:\tools\clcache\clcache-4.1.0;$env:Path"
Expand Down
9 changes: 6 additions & 3 deletions scripts/generate_vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ function doit {
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first conjunct isn't subsumed by the second?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to continue if seeing goto_instrument_main.cpp while not actually building goto-instrument.vcxproj - which actually tells me I still need to fix this and change the second conjunct to [ "$1" != "goto-instrument" ]... will fix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor nit pick on inconsistent use of ${blah} versus $blah?

fi
echo " <ClCompile Include=\"src\\${dir}\\${s}\"/>" >> $dest/$1.vcxproj
done
done
Expand Down Expand Up @@ -50,11 +53,11 @@ function doit {
echo "</Project>" >> $dest/$1.vcxproj.filters
}

dirs="big-int langapi util ansi-c assembler cpp java_bytecode xmllang solvers goto-symex analyses pointer-analysis goto-programs linking cbmc"
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 java_bytecode xmllang solvers goto-symex analyses pointer-analysis goto-programs linking jsil goto-cc"
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 java_bytecode xmllang solvers goto-symex analyses pointer-analysis goto-programs linking goto-instrument"
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
4 changes: 4 additions & 0 deletions scripts/vcxproj.1
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand All @@ -50,6 +52,7 @@
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);STL_HASH_TR1;HAVE_MINISAT2</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)/src;$(ProjectDir)/minisat-2.2.1</AdditionalIncludeDirectories>
<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -65,6 +68,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);STL_HASH_TR1;HAVE_MINISAT2</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)/src;$(ProjectDir)/minisat-2.2.1</AdditionalIncludeDirectories>
<ObjectFileName>$(IntDir)/%(RelativeDir)/</ObjectFileName>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down