NIST-MNI / patch_morphology

ITK patch morphology tools: denoising, segmentation, grading
GNU General Public License v3.0
3 stars 0 forks source link

clang fixes broke ubuntu 16.04 build #6

Open gdevenyi opened 4 years ago

gdevenyi commented 4 years ago

Fix https://github.com/vfonov/patch_morphology/commit/984e5f161f3b0d1c8a369983ff4f9dff6d366c09 broke build on 16.04, gcc 5.4.0-6ubuntu1~16.04.12

  35594 [  9%] Building CXX object src/CMakeFiles/itk_patch_grading.dir/itk_patch_grading.cpp.o
  35595 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp: In function 'itk::ImageToImageFilter<itk::Image<float, 3u>, itk::Image<unsigned char, 3u> >::Pointer run_grading(int, int, int, double, bool, int, bool, itk::Image<flo
  35596 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:398:9: error: expected nested-name-specifier before 'SizeT'
  35597    using SizeT=itk::Size<3>::SizeValueType;
  35598          ^
  35599 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:399:69: error: 'SizeT' does not name a type
  35600    StructuringElementType::RadiusType   search_radius_ = {{static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius)}};
  35601                                                                      ^
  35602 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:399:103: error: 'SizeT' does not name a type
  35603    StructuringElementType::RadiusType   search_radius_ = {{static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius)}};
  35604                                                                                                        ^
  35605 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:399:137: error: 'SizeT' does not name a type
  35606    StructuringElementType::RadiusType   search_radius_ = {{static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius)}};
  35607                                                                                                                                          ^
  35608 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:400:68: error: 'SizeT' does not name a type
  35609    StructuringElementType::RadiusType   patch_radius_  = {{static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius)}};
  35610                                                                     ^
  35611 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:400:101: error: 'SizeT' does not name a type
  35612    StructuringElementType::RadiusType   patch_radius_  = {{static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius)}};
  35613                                                                                                      ^
  35614 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:400:134: error: 'SizeT' does not name a type
  35615    StructuringElementType::RadiusType   patch_radius_  = {{static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius)}};
  35616                                                                                                                                       ^
  35617 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:452:13: error: expected nested-name-specifier before 'SizeT'
  35618        using SizeT=itk::Size<3>::SizeValueType;
  35619              ^
  35620 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:453:71: error: 'SizeT' does not name a type
  35621        StructuringElementType::RadiusType search_radius_={ static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius)};
  35622                                                                        ^
  35623 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:453:105: error: 'SizeT' does not name a type
  35624        StructuringElementType::RadiusType search_radius_={ static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius)};
  35625                                                                                                          ^
  35626 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:453:139: error: 'SizeT' does not name a type
  35627        StructuringElementType::RadiusType search_radius_={ static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius),static_cast<SizeT>(search_radius)};
  35628                                                                                                                                            ^
  35629 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp: In function 'int main(int, char**)':
  35630 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:979:13: error: expected nested-name-specifier before 'SizeT'
  35631        using SizeT=itk::Size<3>::SizeValueType;
  35632              ^
  35633 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:980:72: error: 'SizeT' does not name a type
  35634        StructuringElementType::RadiusType   patch_radius_  = {{static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius)}};
  35635                                                                         ^
  35636 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:980:105: error: 'SizeT' does not name a type
  35637        StructuringElementType::RadiusType   patch_radius_  = {{static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius)}};
  35638                                                                                                          ^
  35639 /home/nistmni/src/minc-toolkit-v2/patch_morphology/src/itk_patch_grading.cpp:980:138: error: 'SizeT' does not name a type
  35640        StructuringElementType::RadiusType   patch_radius_  = {{static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius),static_cast<SizeT>(patch_radius)}};
  35641                                                                                                                                           ^
  35642 src/CMakeFiles/itk_patch_grading.dir/build.make:82: recipe for target 'src/CMakeFiles/itk_patch_grading.dir/itk_patch_grading.cpp.o' failed
vfonov commented 4 years ago

probably have to specify that C++11 is needed

gdevenyi commented 4 years ago

That's what I just narrowed it down to. Testing with:

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

in the cmake config now

gdevenyi commented 4 years ago

confirmed that fixes the build.