Commit a0ade434 authored by Lynn Garren's avatar Lynn Garren
Browse files

Merge branch 'release/CLHEP_2_3_4_1'

parents 4349c559 13bfadcd
...@@ -31,7 +31,7 @@ clhep_ensure_out_of_source_build() ...@@ -31,7 +31,7 @@ clhep_ensure_out_of_source_build()
# use cmake 3.2 or later # use cmake 3.2 or later
cmake_minimum_required(VERSION 3.2) cmake_minimum_required(VERSION 3.2)
# Project setup # Project setup
project(CLHEP VERSION 2.3.4.0) project(CLHEP VERSION 2.3.4.1)
# - needed for (temporary) back compatibility # - needed for (temporary) back compatibility
set(VERSION ${PROJECT_VERSION}) set(VERSION ${PROJECT_VERSION})
......
==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
2016-11-22 Lynn Garren <garren@fnal.gov>
* cmake: bug fix for Apple Clang
Multithreading will be enabled when building with gcc,
Multithreading will be enabled for Apple Clang is 8.0 or later.
Multithreading will be enabled for Clang is 3.5 or later.
============================== ==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
......
============================== ==============================
22.11.16 Release CLHEP-2.3.4.1
==============================
==============================
18.11.16 Release CLHEP-2.3.4.0 18.11.16 Release CLHEP-2.3.4.0
============================== ==============================
============================== ==============================
......
...@@ -102,8 +102,8 @@ macro( _clhep_verify_cxx11 ) ...@@ -102,8 +102,8 @@ macro( _clhep_verify_cxx11 )
set( HAVE_STDCXX true ) set( HAVE_STDCXX true )
endif() endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) 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 "CLHEP now requires c++11 support with clang 3.5 or later") message( FATAL_ERROR "CLHEP now requires c++11 support with Apple Clang 6.0 or later")
else() else()
set( HAVE_STDCXX true ) set( HAVE_STDCXX true )
endif() endif()
...@@ -132,7 +132,7 @@ macro( _clhep_verify_cxx1y ) ...@@ -132,7 +132,7 @@ macro( _clhep_verify_cxx1y )
set( HAVE_STDCXX true ) set( HAVE_STDCXX true )
endif() endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) 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}") message( FATAL_ERROR "c++1y extension is not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}")
else() else()
set( HAVE_STDCXX true ) set( HAVE_STDCXX true )
...@@ -162,7 +162,7 @@ macro( _clhep_verify_cxx14 ) ...@@ -162,7 +162,7 @@ macro( _clhep_verify_cxx14 )
set( HAVE_STDCXX true ) set( HAVE_STDCXX true )
endif() endif()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) 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}") message( FATAL_ERROR "c++14 extension is not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}")
else() else()
set( HAVE_STDCXX true ) set( HAVE_STDCXX true )
...@@ -224,16 +224,7 @@ macro( _clhep_check_cxxstd ) ...@@ -224,16 +224,7 @@ macro( _clhep_check_cxxstd )
endif() endif()
endmacro( _clhep_check_cxxstd ) endmacro( _clhep_check_cxxstd )
macro( clhep_set_compiler_flags ) macro( _clhep_use_pthread )
##message(STATUS "incoming cmake build type is ${CMAKE_BUILD_TYPE}")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "" FORCE)
endif()
_clhep_check_cxxstd()
# find pthread
if(CLHEP_SINGLE_THREAD)
set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL")
else()
set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL thread_local") set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL thread_local")
set(THREADS_PREFER_PTHREAD_FLAG ON) set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads) find_package(Threads)
...@@ -245,6 +236,33 @@ macro( clhep_set_compiler_flags ) ...@@ -245,6 +236,33 @@ macro( clhep_set_compiler_flags )
# needed when building with gcc on OSX # needed when building with gcc on OSX
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread" )
endif() endif()
endmacro( _clhep_use_pthread )
macro( clhep_set_compiler_flags )
##message(STATUS "incoming cmake build type is ${CMAKE_BUILD_TYPE}")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "" FORCE)
endif()
_clhep_check_cxxstd()
# find pthread
if(CLHEP_SINGLE_THREAD)
set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL")
elseif(CMAKE_COMPILER_IS_GNUCXX)
_clhep_use_pthread()
elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0 )
set(CLHEP_THREAD_DEFINITION "#define CLHEP_THREAD_LOCAL")
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() endif()
if( CLHEP_DEBUG_MESSAGES ) if( CLHEP_DEBUG_MESSAGES )
message(STATUS "enable c++11 extensions: ${CMAKE_CXX_FLAGS}") message(STATUS "enable c++11 extensions: ${CMAKE_CXX_FLAGS}")
......
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