Skip to content

Commit

Permalink
[CMake] Add support for Solaris 11
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Janyst authored and ljanyst committed Jan 22, 2014
1 parent 1e6e8ad commit 0c68499
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions cmake/XRootDOSDefs.cmake
Expand Up @@ -77,10 +77,20 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS" )

define_solaris_flavor()

#-----------------------------------------------------------------------------
# Define solaris version
#-----------------------------------------------------------------------------
execute_process( COMMAND uname -r
OUTPUT_VARIABLE SOLARIS_VER )
string( REPLACE "." ";" SOLARIS_VER_LIST ${SOLARIS_VER} )
list( GET SOLARIS_VER_LIST 1 SOLARIS_VERSION )
string( REPLACE "\n" "" SOLARIS_VERSION ${SOLARIS_VERSION} )
add_definitions( -DSOLARIS_VERSION=${SOLARIS_VERSION} )

#-----------------------------------------------------------------------------
# AMD64 (opteron)
#-----------------------------------------------------------------------------
if( SOLARIS_AMD64 AND NOT FORCE_32BITS )
if( ${SOLARIS_VERSION} STREQUAL "5.10" AND SOLARIS_AMD64 AND NOT FORCE_32BITS )
set( CMAKE_CXX_FLAGS " -m64 -xtarget=opteron -xs ${CMAKE_CXX_FLAGS} " )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -G" )
set( CMAKE_LIBRARY_PATH "/lib/64;/usr/lib/64" )
Expand All @@ -105,14 +115,4 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS" )
"
SUNCC_CAN_DO_OPTS )

#-----------------------------------------------------------------------------
# Define solaris version
#-----------------------------------------------------------------------------
execute_process( COMMAND uname -r
OUTPUT_VARIABLE SOLARIS_VER )
string( REPLACE "." ";" SOLARIS_VER_LIST ${SOLARIS_VER} )
list( GET SOLARIS_VER_LIST 1 SOLARIS_VERSION )
string( REPLACE "\n" "" SOLARIS_VERSION ${SOLARIS_VERSION} )
add_definitions( -DSOLARIS_VERSION=${SOLARIS_VERSION} )

endif()

0 comments on commit 0c68499

Please sign in to comment.