rordenlab / dcm2niix

dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC
https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage
Other
899 stars 229 forks source link

CMake error when attempting to compile latest development branch #869

Closed CGSchwarzMayo closed 1 month ago

CGSchwarzMayo commented 1 month ago

Hi Chris, In trying to re-base #857 from the latest commit, as you requested, I am unable to compile the latest commit due to what appears to be syntax error in CMakeLists in one of the interim commits. I'll have to wait for this to be fixed before I can compile/test again.

Describe the bug CMake Error at CMakeLists.txt:265: Parse error. Function missing ending ")". Instead found unterminated string with text ")

To reproduce


$ git checkout development
Already on 'development'
Your branch is up to date with 'origin/development'.
[m107615@roqadi002a dcm2niix]$ make clean && make
[ 12%] Creating directories for 'console'
[ 25%] No download step for 'console'
[ 37%] No update step for 'console'
[ 50%] No patch step for 'console'
[ 62%] Performing configure step for 'console'
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:265:
  Parse error.  Function missing ending ")".  Instead found unterminated
  string with text ")

      #Apple notarization requires a Info.plist
      # For .app bundles, the Info.plist is a separate file, for executables it is appended as a section
      #you can check that the Info.plist section has been inserted with either of these commands
      # otool -l ./dcm2niix | grep info_plist -B1 -A10
      # launchctl plist ./dcm2niix

  endif()

  install(TARGETS ${PROGRAMS} DESTINATION bin)

  if(BUILD_DCM2NIIXFSLIB)

      install(TARGETS ${DCM2NIIXFSLIB} DESTINATION lib)

  endif()

  ".

-- Configuring incomplete, errors occurred!
make[2]: *** [CMakeFiles/console.dir/build.make:92: console-prefix/src/console-stamp/console-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/console.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Expected behavior

I expected it to compile.

Output log

Above

Version

Rocky Linux release 8.10 (Green Obsidian) Development branch d8aacc58446c5dee08ebc8a0b83a264c401e8e88

$ cmake --version
cmake version 3.26.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
CGSchwarzMayo commented 1 month ago

I confirmed that this now compiles for me.