Changeset 2898


Ignore:
Timestamp:
03/06/14 19:32:19 (11 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: cmake -DNO_SOVERSION=TRUE ..

Put in Release Notes: No

Module(s): asap

Description: Committing cmake script sent from Darrell to support a new cmake option, NO_SOVERSION to disable shared library version.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmake/withcasa.cmake

    r2893 r2898  
    77if( APPLE )
    88   if( CMAKE_SYSTEM MATCHES ^Darwin-10 OR
    9                 CMAKE_SYSTEM MATCHES ^Darwin-11 OR
    10                 CMAKE_SYSTEM MATCHES ^Darwin-12 )
     9        CMAKE_SYSTEM MATCHES ^Darwin-11 OR
     10        CMAKE_SYSTEM MATCHES ^Darwin-12 )
    1111      if ( NOT arch )
    1212         set( arch darwin64 )
     
    101101set( CASACORE_PATHS "${casaroot}/${arch};${casaroot};/usr/local;/usr" )
    102102
    103 set( epochdelta 1385403204 )
    104 if ( EXISTS ${CMAKE_INSTALL_PREFIX}/${arch}/casa_sover.txt )
    105     execute_process( COMMAND perl -e "while (<>) { chomp and print if (! m/^\#/ ) }" ${CMAKE_INSTALL_PREFIX}/${arch}/casa_sover.txt
    106                      OUTPUT_VARIABLE __asap_soversion )
    107 elseif( EXISTS ${CMAKE_INSTALL_PREFIX}/casa_sover.txt )
    108     execute_process( COMMAND perl -e "while (<>) { chomp and print if (! m/^#/ ) }" ${CMAKE_INSTALL_PREFIX}/casa_sover.txt
    109                      OUTPUT_VARIABLE __asap_soversion )
     103SET(NO_SOVERSION FALSE CACHE BOOL "do not add version information to shared libraries")
     104if( NOT NO_SOVERSION )
     105    set( epochdelta 1385403204 )
     106    if ( EXISTS ${CMAKE_INSTALL_PREFIX}/${arch}/casa_sover.txt )
     107        execute_process( COMMAND perl -e "while (<>) { chomp and print if (! m/^\#/ ) }" ${CMAKE_INSTALL_PREFIX}/${arch}/casa_sover.txt
     108                         OUTPUT_VARIABLE __asap_soversion )
     109    elseif( EXISTS ${CMAKE_INSTALL_PREFIX}/casa_sover.txt )
     110        execute_process( COMMAND perl -e "while (<>) { chomp and print if (! m/^#/ ) }" ${CMAKE_INSTALL_PREFIX}/casa_sover.txt
     111                         OUTPUT_VARIABLE __asap_soversion )
     112    else( )
     113        execute_process( COMMAND perl -e "$t=time( )-${epochdelta};$z=$t & 0xff; $y=($t>>8)&0xff; $x=($t>>16)&0xffff; print \"$x.$y.$z\""
     114                         OUTPUT_VARIABLE __asap_soversion )
     115    endif( )
     116    set(asap_soversion ${__asap_soversion} CACHE STRING "version for shared objects")
     117    message( STATUS "Shared object version number ${asap_soversion}" )
    110118else( )
    111     execute_process( COMMAND perl -e "$t=time( )-${epochdelta};$z=$t & 0xff; $y=($t>>8)&0xff; $x=($t>>16)&0xffff; print \"$x.$y.$z\""
    112                      OUTPUT_VARIABLE __asap_soversion )
     119    message( STATUS "User disabled shared library versioning" )
    113120endif( )
    114 set(asap_soversion ${__asap_soversion} CACHE STRING "version for shared objects")
    115 message( STATUS "shared object version number ${asap_soversion}" )
    116121
    117122#
Note: See TracChangeset for help on using the changeset viewer.