Merge pull request #432 from socketwiz/master

build error on SmartOS
This commit is contained in:
Val Markovic 2013-07-12 11:10:25 -07:00
commit 7659a7b8f9
3 changed files with 14 additions and 0 deletions

View File

@ -118,3 +118,8 @@ if( MSVC )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL" ) set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL" )
set_target_properties( ${PROJECT_NAME} PROPERTIES STATIC_LIBRARY_FLAGS "/LTCG" ) set_target_properties( ${PROJECT_NAME} PROPERTIES STATIC_LIBRARY_FLAGS "/LTCG" )
endif() endif()
if( SYSTEM_IS_SUNOS )
# SunOS needs this setting for thread support
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthreads" )
endif()

View File

@ -28,6 +28,10 @@ if ( ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" )
set( SYSTEM_IS_FREEBSD true ) set( SYSTEM_IS_FREEBSD true )
endif() endif()
if ( ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" )
set( SYSTEM_IS_SUNOS true )
endif()
# Check if platform is 64 bit # Check if platform is 64 bit
if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) if( CMAKE_SIZEOF_VOID_P EQUAL 4 )
set( 64_BIT_PLATFORM 0 ) set( 64_BIT_PLATFORM 0 )

View File

@ -313,4 +313,9 @@ endif()
############################################################################# #############################################################################
if( SYSTEM_IS_SUNOS )
# SunOS needs this setting for thread support
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthreads" )
endif()
add_subdirectory( tests ) add_subdirectory( tests )