Changeset 3027 for trunk


Ignore:
Timestamp:
02/12/15 20:19:21 (10 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Do not use linker option -s for build on OS X 10.8 since it causes link error.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r3022 r3027  
    6565set( CMAKE_CXX_FLAGS_PROFILE "-g -O2 -pg -fprofile-arcs -fno-omit-frame-pointer" )
    6666
    67 # flags for Release build
    68 set( CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s" )
    69 set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s" )
    70 
    71 # flags for MinSizeRel build
    72 set( CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Wl,-s" )
    73 set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,-s" )
     67
     68# flags for Release and MinSizeRel build
     69if ( APPLE )
     70    # OS X
     71    # On 10.8 (Darwin-12) with llvm clang, -s option for linker
     72    # causes link error. This may be because that -s option is
     73    # obsolete and is different behavior from Linux.
     74    if ( CMAKE_SYSTEM MATCHES ^Darwin-11 AND NOT LLVMCOMPILER )
     75        set( CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s" )
     76        set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s" )
     77        set( CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Wl,-s" )
     78        set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,-s" )
     79    endif()
     80else()
     81    # Linux
     82    set( CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s" )
     83    set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s" )
     84    set( CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "-Wl,-s" )
     85    set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,-s" )
     86endif()
    7487
    7588if ( DEFINED CXX_FLAGS_TAIL_END )
Note: See TracChangeset for help on using the changeset viewer.