View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011679CMakeModulespublic2011-01-10 17:142011-01-26 15:27
ReporterEmmanuel Blot 
Assigned ToAlex Neundorf 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAppleOSMac OS XOS Version10.6.6
Product VersionCMake 2.8.3 
Target VersionFixed in Version 
Summary0011679: CMAKE_FORCE_C_COMPILER fails to parse compiler name that contains a version number
DescriptionUsing the following commands:
  FIND_PROGRAM (xcc arm-eabi-gcc)
  CMAKE_FORCE_C_COMPILER (${xcc} GNU)
works as expected.

RANLIB and AR commands are mapped to the same target, namely:
arm-eabi-ranlib and arm-eabi-ar
  
However, when a version is specified:
  FIND_PROGRAM (xcc arm-eabi-gcc-4.5.2)
  CMAKE_FORCE_C_COMPILER (${xcc} GNU)
RANLIB and AR commands are left to the default, host tools (which lead to later compilation errors)

In this latter case, the _CMAKE_TOOLCHAIN_PREFIX is left empty. It seems that the compiler string parser is in trouble.
Additional InformationThe issue occurs whatever the platform (at least tested on Cygwin and Mac OS X), and it seems it may also occur with CMAKE_C_COMPILER.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0025093)
Alex Neundorf (developer)
2011-01-26 12:25

This is the regexp which is used:
IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")

so it would match "arm-eabi-gcc.exe" and "arm-eabi-gcc", but it doesn't match arm-eabi-gcc-x.y.z(.exe)?.
I'll have a look.

Alex
(0025097)
Alex Neundorf (developer)
2011-01-26 15:27

I changed the regex so it now accepts a version number and pushed this to the next branch.
Not sure whether it will still make it into 2.8.4.

Alex

 Issue History
Date Modified Username Field Change
2011-01-10 17:14 Emmanuel Blot New Issue
2011-01-17 17:03 David Cole Assigned To => Alex Neundorf
2011-01-17 17:03 David Cole Status new => assigned
2011-01-26 12:25 Alex Neundorf Note Added: 0025093
2011-01-26 15:27 Alex Neundorf Note Added: 0025097
2011-01-26 15:27 Alex Neundorf Status assigned => closed
2011-01-26 15:27 Alex Neundorf Resolution open => fixed
2011-01-26 15:27 Alex Neundorf Category CMake => Modules


Copyright © 2000 - 2018 MantisBT Team