Project

General

Profile

Bug #1329

Error during cmake with gcc version parsing

Added by Maxime Daisy almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
Start date:
11 Dec 2017
Due date:
% Done:

100%

Estimated time:
1.00 h

Description

Hello,

When using cmake (3.9.1 on Lubuntu 17.10 32bit), an error occurs:

CMake Error at CMakeLists.txt:80 (list):   list index: 1 out of range (-1, 0)

It happens when gcc -dumpversion return something like "7" (in my case), not "major.minor".
I temporarily fixed that by doing the following:

IF(GCC_VERSION_COMPONENTS_LENGTH GREATER 1)
   list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
ELSE()
   SET(GCC_MINOR 0)
ENDIF()

History

#1

Updated by Robin Mills almost 4 years ago

  • Category set to build
  • Status changed from New to Closed
  • Assignee set to Robin Mills
  • Target version set to 0.27
  • % Done changed from 0 to 100
  • Estimated time set to 1.00 h

This is a known issue and fixed on master http://github.com/exiv2/exiv2.git

Our CMake code has been totally rewritten for v0.27. I don't recalled exactly how this issue was addressed on 'master', however your workaround looks fine. If it's working OK for you, that's fine with me.

Robin

Also available in: Atom PDF