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

CMAKE_CXX_FLAGS might be empty

parent e2357a66
......@@ -111,22 +111,24 @@ endmacro( _clhep_check_cxxstd )
macro( _clhep_check_for_pthread )
#message(STATUS "_clhep_check_for_pthread debug: CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
string(REGEX REPLACE " " ";" flag_list ${CMAKE_CXX_FLAGS})
FOREACH(flag ${flag_list})
#message(STATUS "_clhep_check_for_pthread debug: found flag ${flag}" )
if( ${flag} STREQUAL "-std=c++11" )
set(HAVE_STDCXX true)
elseif( ${flag} STREQUAL "-std=c++1y" )
set(HAVE_STDCXX true)
elseif( ${flag} STREQUAL "-std=c++0x" )
set(HAVE_STDCXX true)
endif()
ENDFOREACH(flag)
if( HAVE_STDCXX )
set( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}" )
if( ${CMAKE_CXX_FLAGS} )
string(REGEX REPLACE " " ";" flag_list ${CMAKE_CXX_FLAGS})
FOREACH(flag ${flag_list})
#message(STATUS "_clhep_check_for_pthread debug: found flag ${flag}" )
if( ${flag} STREQUAL "-std=c++11" )
set(HAVE_STDCXX true)
elseif( ${flag} STREQUAL "-std=c++1y" )
set(HAVE_STDCXX true)
elseif( ${flag} STREQUAL "-std=c++0x" )
set(HAVE_STDCXX true)
endif()
ENDFOREACH(flag)
if( HAVE_STDCXX )
set( CMAKE_CXX_FLAGS "-pthread ${CMAKE_CXX_FLAGS}" )
endif()
#message(STATUS "_clhep_check_for_pthread debug: HAVE_STDCXX ${HAVE_STDCXX}")
#message(STATUS "_clhep_check_for_pthread debug: CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
endif()
#message(STATUS "_clhep_check_for_pthread debug: HAVE_STDCXX ${HAVE_STDCXX}")
#message(STATUS "_clhep_check_for_pthread debug: CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
endmacro( _clhep_check_for_pthread )
macro( clhep_set_compiler_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