Skip to content
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

[SofaCUDA] FIX: NVCC flags for debug build on Windows #300

Conversation

Innokentiy-Alaytsev
Copy link
Contributor

@Innokentiy-Alaytsev Innokentiy-Alaytsev commented Jun 10, 2017

Targets are built with debug version of runtime library in debug configuration
under MS Visual Studio. This is enabled with /MDd compiler flag. Missing this
flag for NVCC generated object files results in linker fails due to different
versions of runtime libraries.

The problem is resolved by explicitly setting compiler options for debug build
under Windows. The solution is given only for Windows and only for MSVS because
it's the only officially supported by NVidia compiler on this platform.


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

Targets are built with debug version of runtime library in debug configuration
under MS Visual Studio. This is enabled with /MDd compiler flag. Missing this
flag for NVCC generated object files results in linker fails due to different
versions of runtime libraries.

The problem is resolved by explicitly setting compiler options for debug build
under Windows. The solution is given only for Windows and only for MSVS because
it's the only officially supported by NVidia compiler on this platform.
@sofabot
Copy link
Collaborator

sofabot commented Jun 10, 2017

Thank you for your pull request!
Someone will soon check it and start the builds.

@guparan
Copy link
Contributor

guparan commented Jun 12, 2017

Thank you for this fix.
Starting the builds will be useless here since we do not have a VS-2015_options-debug config.
LGTM though. Anyone to confirm?

@guparan guparan added pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Jun 12, 2017
@damienmarchal
Copy link
Contributor

[ci-build]

@guparan guparan merged commit d47e80e into sofa-framework:master Jun 19, 2017
@Innokentiy-Alaytsev Innokentiy-Alaytsev deleted the SofaCUDA-fix-NVCC-debug-flags branch June 28, 2017 12:31
@guparan guparan added this to the v17.06 milestone Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants