acil-bwh / ChestImagingPlatform

Chest Imaging Platform (CIP)
Other
55 stars 34 forks source link

COMP: Fix build with projects that use C++ standard >11 #42

Closed lassoan closed 2 years ago

lassoan commented 2 years ago

Slicer switched to C++14, therefore the hardcoded C++ standard version in CIP caused a configuration conflict.

CMake Error at /Volumes/D/P/S-0-build/Slicer-build/SlicerConfig.cmake:976 (message):
  Variable CMAKE_CXX_STANDARD defined prior calling 'find_package(Slicer)'
  does NOT match value used to configure Slicer.  It probably means that a
  different CMAKE_CXX_STANDARD has been used to configure this project and
  Slicer.

  CMAKE_CXX_STANDARD=11

  Slicer_CMAKE_CXX_STANDARD=14
Call Stack (most recent call first):
  /Volumes/D/P/S-0-build/Slicer-build/SlicerConfig.cmake:990 (slicer_config_set_compiler_ep)
  CMakeLists.txt:37 (find_package)

-- Configuring incomplete, errors occurred!
See also "/Volumes/D/P/S-0-E-b/Chest_Imaging_Platform-build/CMakeFiles/CMakeOutput.log".

Fixed by making the version externally configurable.

lassoan commented 2 years ago

@rjosest It is a fairly trivial change, please merge it to allow CIP extension to become available again in the latest Slicer Preview Release. If you grant me write access to the repository then I can merge such changes and I don't need to bother you with them.

lassoan commented 2 years ago

@rjosest We plan to release Slicer5 in a couple of days and we want to ensure that all major extensions are available for it. To avoid pressuring you into reviewing and merging changes, we'll fork this repository in the Slicer organization so that we can do this work ourselves. If you can give us write access to this repository or commit to merge essential pull request then we can switch back to using this repository.

jamesobutler commented 2 years ago

@jcross186 Could you help with the integration of this PR? Thanks!