SlicerRt / SlicerRT

Open-source toolkit for radiation therapy research, an extension of 3D Slicer. Features include DICOM-RT import/export, dose volume histogram, dose accumulation, external beam planning (TPS), structure comparison and morphology, isodose line/surface generation, etc.
https://slicerrt.org
124 stars 60 forks source link

Plastimatch changes for C++17 compilation under Linux and Mac #213

Closed MichaelColonel closed 2 years ago

MichaelColonel commented 2 years ago

There are still problems for Mac and Linux compilation after C++17 update

Mac - https://slicer.cdash.org/viewBuildError.php?buildid=2734563 Linux - https://slicer.cdash.org/viewBuildError.php?buildid=2734411

The error is the same - dynamic exception specifications doesn't allowed in C++17.

I have tested under Linux.

Files to modify:

  1. itkVelocityFieldLieBracketFilter.h. Already modified in Plastimatch master

  2. itkVelocityFieldLieBracketFilter.txx. Already modified in Plastimatch master

  3. matrix.h. Unmodified in Plastimatch master

I think these throws can be hidden in preprocessor definition, rather than just deleted. IMHO.

Sunderlandkyl commented 2 years ago

I've created an updated plastimatch branch from the latest version + removed the throw from matrix.h. Everything compiles correctly on Windows.

Can you confirm that the update fixes the issue on Linux?

MichaelColonel commented 2 years ago

Compilation and tests are OK!

MichaelColonel commented 2 years ago

For Mac there is another issue. The register specifier must be removed. On linux with GCC-11.2 it's just a warning.

jamesobutler commented 2 years ago

There are no more build errors as of https://github.com/SlicerRt/SlicerRT/commit/8a7330502e9e0daa327dad6a9552e987aa837a77.