3
0
mirror of https://github.com/triqs/dft_tools synced 2024-10-31 11:13:46 +01:00

continued : further correction on mac

The issue was the detection of clang version on mac,
depends if packaged by Apple or not...
This commit is contained in:
Olivier Parcollet 2014-01-09 19:42:01 +01:00
parent 8f7180660f
commit eec9a0662a

View File

@ -34,8 +34,12 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Apple which does not has the official clang version number ...
string(REGEX REPLACE ".*LLVM ([2-5]\\.[0-9]).*" "\\1" compiler_version ${_compiler_output})
# but this does not work if clang is not from Apple (compiled manually on the mac)
if (NOT ${compiler_version})
string(REGEX REPLACE ".* version ([2-5]\\.[0-9]).*" "\\1" compiler_version ${_compiler_output})
endif()
else()
string(REGEX REPLACE ".*([2-5]\\.[0-9]).*" "\\1" compiler_version ${_compiler_output})
string(REGEX REPLACE ".* version ([2-5]\\.[0-9]).*" "\\1" compiler_version ${_compiler_output})
endif()
#message(STATUS "Compiler --version output = ${_compiler_output}")
message(STATUS "Compiler version = ${compiler_version}")