Problem 1734

Summary: clang version not correctly detected
Product: Geant4 Reporter: Florian Uhlig <f.uhlig>
Component: cmakeAssignee: Ben Morgan <Ben.Morgan>
Status: CLOSED FIXED    
Severity: major CC: kelsey
Priority: P5    
Version: 10.0   
Hardware: Apple   
OS: Mac OS X   

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?