Commit 5696f027 authored by Lynn Garren's avatar Lynn Garren
Browse files

sort out AppleClang versus Clang versioning

parent 1fc92605
......@@ -102,8 +102,8 @@ macro( _clhep_verify_cxx11 )
set( HAVE_STDCXX true )
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5 )
message( FATAL_ERROR "CLHEP now requires c++11 support with clang 3.5 or later")
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0 )
message( FATAL_ERROR "CLHEP now requires c++11 support with Apple Clang 6.0 or later")
else()
set( HAVE_STDCXX true )
endif()
......@@ -132,7 +132,7 @@ macro( _clhep_verify_cxx1y )
set( HAVE_STDCXX true )
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5 )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0 )
message( FATAL_ERROR "c++1y extension is not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}")
else()
set( HAVE_STDCXX true )
......@@ -162,7 +162,7 @@ macro( _clhep_verify_cxx14 )
set( HAVE_STDCXX true )
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5 )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0 )
message( FATAL_ERROR "c++14 extension is not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}")
else()
set( HAVE_STDCXX true )
......@@ -255,6 +255,12 @@ macro( clhep_set_compiler_flags )
else()
_clhep_use_pthread()
endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5 )
set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL")
else()
_clhep_use_pthread()
endif()
else()
set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL")
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment