Page MenuHomePhabricator

Improve MITK build experience
Closed, ResolvedPublic

Description

Some minor issues with MITK build / superbuild

  • some superbuild configurations (i.e. Release) depend on the availability of Doxygen, however it is only searched for in the MITK build itself, which leads to a late and difficult to understand error about Blueberry help
  • warning levels on Mac/Linux vs MSVC could be more inconsistent, which in turn could help to avoid errors earlier by showing up on all platforms

Event Timeline

First suggestion: /W34100 , make unused parameters a level 3 warning (our warning level)

@floca @kislinsk : any other typical warnings-as-errors you can think of that show on Linux/Mac but not MSVC?

Good idea that would really help.

Following things are also typicall gcc errors/warnings when comming from VS

  • unneeded typename. Typename was used where it isn't needed
  • missing typename. Typename is not used wenn declaring e.g. variables of a type that was typedefed in a template class.

If VS has a warning for these. It would be great to activate them.

If VS has a warning for these. It would be great to activate them.

Unfortunately it seems that MSVC still tries to get it completely right, but also needs C++17 enabled for that:

https://docs.microsoft.com/en-us/cpp/cpp-conformance-improvements-2017?view=vs-2017

So no luck here.

Ok, further reading lead to the /permissive- option which actually should detect some of these issues in the latest MSVC 2017 Update 15.8 . But I guess this will detect also a lot of other non-standard stuff. Let's see, could be worth the effort in the long run, I will test and report here
`

I enhanced our CMake script to pre-set the Visual Studio redistributable, which already comes along with Visual Studio 2017.

Latest MSVC update is incompatible with our boost version and leads to compile errors. I will update Boost and add a patch to include the commit mentioned in this thread: https://github.com/boostorg/iostreams/issues/60

Seems we cannot even turn on unused parameter warnings since to many are triggered by external code. There are workarounds, but the proper solution would be on the MSVC side to handle external include directories different from standard ones. This is ongoing work, and at some point there will be CMake support as well

https://gitlab.kitware.com/cmake/cmake/issues/17904

I made the minimum required versions of compilers and Qt more consistent in our CMake scripts as well as the documentation.

kislinsk triaged this task as Normal priority.Oct 1 2018, 12:24 PM
kislinsk edited projects, added MITK (2018-04); removed MITK.
kislinsk moved this task from Backlog to Blocking v2018.04 on the MITK (2018-04) board.
kislinsk moved this task from Blocking v2018.04 to Backlog on the MITK (2018-04) board.

I (hopefully) improved our CMake script by hint find_package(Qt5) at Qt default install locations (C:/Qt). Only MSVC for now, Linux and macOS are following tomorrow with /opt/Qt and ~/Qt.

Ok, warning level harmonization for Linux and Windows turns out to be impossible at the moment, we have to wait for MSVC updates. The other ideas have been fixed and merged.