Using Microsoft Visual Studio 2015, there is a flood of warnings about relative include paths in OpenMW's source code.
It seems like an easy fix, just changing e.g. #include "../mwbase/world.hpp" to #include "apps/openmw/mwbase/world.hpp"
but maybe there is a reason why making this change is undesirable?
For anyone who is using Microsoft Visual Studio 2015 like me, it would be nice to clear some of the junk out of the way of the warning message log so we can see more important messages, so I would like to fix these in files I contribute to, but is there a problem with this? Thanks.
Relative include paths
Relative include paths
Last edited by Allofich on 17 Jun 2016, 18:36, edited 1 time in total.
- psi29a
- Posts: 5356
- Joined: 29 Sep 2011, 10:13
- Location: Belgium
- Gitlab profile: https://gitlab.com/psi29a/
- Contact:
Re: Relative include paths
do it, make a pull request and we'll see what travis-ci and appveyor says
Re: Relative include paths
Sure, I'll give it a shot, then.
Re: Relative include paths
Everything worked fine with the travis and appveyor compilers, but after giving the issue a fresh consideration, I think this might not be a productive direction to go. While it would be nice to cut down on the Microsoft Visual Studio warnings, it may be better to only worry about warnings generated from things like the travis and appveyor builds that are easily accessible to everyone working on the project. Any thoughts? I'm leaning toward closing my pull request of Microsoft Visual Studio warning fixes.
Re: Relative include paths
Is it possible to disable that specific warning with MSVC? I don't imagine it'd be a problem to modify the cmake scripts to add the switch to disable the 'relative include path' warning.
Re: Relative include paths
You can set a warning level so that the relative path warning, along with other warnings, will not show up any more. It's also supposedly possible to suppress a specific warning.
https://msdn.microsoft.com/en-us/library/jj715718.aspx
Anyway I was told that include paths with .. are preferable, so I closed the pull request.
https://msdn.microsoft.com/en-us/library/jj715718.aspx
Anyway I was told that include paths with .. are preferable, so I closed the pull request.