Commit 034c289b authored by Lynn Garren's avatar Lynn Garren
Browse files

overriding the compiler default tls settings is a bad idea

parent 48fccd2a
...@@ -94,17 +94,15 @@ macro( _clhep_check_cxxstd ) ...@@ -94,17 +94,15 @@ macro( _clhep_check_cxxstd )
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.9 ) if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.9 )
message( FATAL_ERROR "c++11 extensions are not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}") message( FATAL_ERROR "c++11 extensions are not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}")
else() else()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ftls-model=initial-exec -pthread -Wno-deprecated-declarations" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wno-deprecated-declarations" )
endif() endif()
elseif(CMAKE_COMPILER_IS_GNUCXX) elseif(CMAKE_COMPILER_IS_GNUCXX)
if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3 ) if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3 )
message( FATAL_ERROR "c++11 extensions are not available for ${CMAKE_CXX_COMPILER}") message( FATAL_ERROR "c++11 extensions are not available for ${CMAKE_CXX_COMPILER}")
elseif( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7 ) elseif( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7 )
# set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -ftls-model=initial-exec -pthread -Wno-deprecated-declarations" ) set( CMAKE_CXX_FLAGS "-std=c++0x -pthread -Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}" )
set( CMAKE_CXX_FLAGS "-std=c++0x -ftls-model=initial-exec -pthread -Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}" )
else() else()
#set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -ftls-model=initial-exec -pthread -Wno-deprecated-declarations" ) set( CMAKE_CXX_FLAGS "-std=c++11 -pthread -Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}" )
set( CMAKE_CXX_FLAGS "-std=c++11 -ftls-model=initial-exec -pthread -Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}" )
endif() endif()
else() else()
message(STATUS "clhep_set_compiler_flags: Do not know how to set c++11 extensions for ${CMAKE_CXX_COMPILER_ID}") message(STATUS "clhep_set_compiler_flags: Do not know how to set c++11 extensions for ${CMAKE_CXX_COMPILER_ID}")
...@@ -125,7 +123,7 @@ macro( _clhep_check_for_pthread ) ...@@ -125,7 +123,7 @@ macro( _clhep_check_for_pthread )
endif() endif()
ENDFOREACH(flag) ENDFOREACH(flag)
if( HAVE_STDCXX ) if( HAVE_STDCXX )
set( CMAKE_CXX_FLAGS "-ftls-model=initial-exec -pthread ${CMAKE_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}" )
endif() endif()
#message(STATUS "_clhep_check_for_pthread debug: HAVE_STDCXX ${HAVE_STDCXX}") #message(STATUS "_clhep_check_for_pthread debug: HAVE_STDCXX ${HAVE_STDCXX}")
#message(STATUS "_clhep_check_for_pthread debug: CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") #message(STATUS "_clhep_check_for_pthread debug: CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
......
Supports Markdown
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