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

Conversation

tautschnig
Copy link
Collaborator

  1. We have multiple source files with the same basename, and thus need
    to instruct Visual Studio not to put build artefacts into a single
    directory.
  2. Directory dependencies have changed.
  3. Specifically, cbmc now also depends on (parts of) goto-instrument;
    yet we must not include goto_instrument_main.cpp in the CBMC build as it
    would cause duplicate main functions.
  4. Cleanup: While reviewing 2) I noticed that we had a duplicate
    json$(LIBEXT) entry in CBMC's Makefile.
  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@smowton
Copy link
Contributor

smowton commented May 21, 2019

Would it be easy to run and briefly verify the function of this script in our Win32 CI?

@tautschnig
Copy link
Collaborator Author

Would it be easy to run and briefly verify the function of this script in our Win32 CI?

Doable, if we are ok with increasing the Windows build time (Travis usually takes the most time, so it would likely be ok). I'll add a commit taking care of this.

@@ -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" ] && [ "$s" != "${1}_main.cpp" ] ; 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?

@kroening
Copy link
Member

I am quite worried about the ever-slower CI...

@tautschnig
Copy link
Collaborator Author

I am quite worried about the ever-slower CI...

We could run it in parallel, but I don't know how/whether we can add more CodeBuild jobs.

@tautschnig
Copy link
Collaborator Author

The Windows build is now failing in an expected way, PR to fix this will follow the next hours.

@tautschnig tautschnig changed the title Update generate_vcxproj to work with current source tree Update generate_vcxproj to work with current source tree [depends-on: #4688] May 22, 2019
tautschnig added a commit that referenced this pull request May 23, 2019
fix for handling of wchars on windows in getting the directory name [blocks: #4678]
@tautschnig tautschnig changed the title Update generate_vcxproj to work with current source tree [depends-on: #4688] Update generate_vcxproj to work with current source tree May 29, 2019
@tautschnig tautschnig assigned kroening and unassigned tautschnig May 29, 2019
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 3d0d151).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/113716934

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, so I'm happy for this to go in as is. The one nit pick is very minor, so I don't mind if you ignore it.

A more general question: Rather than having our own script to generate the project file, and effectively having yet another parallel build system (in the sense that its another script that has to be told about directories, various dependencies, etc) - can we just use CMake to geneerate the Visual Studio project file?

@@ -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" ] && [ "$s" != "${1}_main.cpp" ] ; then
continue
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?

1) We have multiple source files with the same basename, and thus need
to instruct Visual Studio not to put build artefacts into a single
directory.
2) Directory dependencies have changed.
3) Specifically, cbmc now also depends on (parts of) goto-instrument;
yet we must not include goto_instrument_main.cpp in the CBMC build as it
would cause duplicate main functions.
4) Set PlatformToolset in project file to make sure the project can be
used with msbuild.
Build the Visual Studio project file and (re-)build CBMC using that
project file via msbuild.
@tautschnig
Copy link
Collaborator Author

[...] can we just use CMake to geneerate the Visual Studio project file?

I think that's a route worth exploring, but does require more work. I'd prefer to make it part of my yet-to-be-completed work in #4300, which requires me experimenting with Windows a lot more.

@tautschnig tautschnig merged commit 2ef189b into diffblue:develop May 30, 2019
@tautschnig tautschnig deleted the vcxproj-fixes branch May 30, 2019 13:53
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 6c2d601).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/113745591

@tautschnig tautschnig restored the vcxproj-fixes branch December 27, 2020 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants