Problem 1734 - clang version not correctly detected
Summary: clang version not correctly detected
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: cmake (show other problems)
Version: 10.0
Hardware: Apple Mac OS X
: P5 major
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2015-04-16 07:36 CEST by Florian Uhlig
Modified: 2015-04-20 18:14 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Florian Uhlig 2015-04-16 07:36:30 CEST
Hi,

with the newest version of clang on Mac OSX the clang version isn't detected. The reason is that the version string changed and the used regular expression doesn't work any longer. The issue can easily be solved by slightly changing the used regex. Please find a patch below.

Ciao

Florian 

--- cmake/Modules/Geant4MakeRules_cxx.cmake_orig	2015-04-11 00:48:37.000000000 -0700
+++ cmake/Modules/Geant4MakeRules_cxx.cmake	2015-04-11 00:49:25.000000000 -0700
@@ -80,7 +80,7 @@
   # and if so extract the original LLVM version which should appear as
   # "based on LLVM X.Ysvn"
   if(APPLE AND "${_clangcxx_version}" MATCHES ".*Apple LLVM version.*")
-    string(REGEX REPLACE ".*based on LLVM ([0-9]\\.[0-9]+)svn.*" "\\1" _clangcxx_version ${_clangcxx_version})
+    string(REGEX REPLACE ".*based on LLVM ([0-9][.0-9]+)svn.*" "\\1" _clangcxx_version ${_clangcxx_version})
   endif()
   message(STATUS "Clang version : ${_clangcxx_version}")
Comment 1 Ben Morgan 2015-04-16 13:13:25 CEST
A patch is currently under testing.
Comment 2 Ben Morgan 2015-04-16 17:06:11 CEST
Now fixed in tag cmake-V10-01-06
Comment 3 Michael Kelsey 2015-04-20 18:14:39 CEST
Ben, can you port this back to a V10-00-xx tag for inclusion in the next 10.0 patch?