Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 14, 2011, 3:53:38 AM (13 years ago)
Author:
rgrieder
Message:

Merged ois_update branch (before it was renamed to mac_osx) into kicklib branch.

Location:
code/branches/kicklib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib

  • code/branches/kicklib/cmake/CompilerConfigGCC.cmake

    r7458 r8071  
    2626INCLUDE(FlagUtilities)
    2727INCLUDE(CompareVersionStrings)
     28INCLUDE(CheckCXXCompilerFlag)
    2829
    2930# Shortcut for CMAKE_COMPILER_IS_GNUCXX and ..._GNUC
     
    3637  OUTPUT_VARIABLE GCC_VERSION
    3738)
    38 
    39 # Complain about incompatibilities
    40 COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.4.0" _compare_result)
    41 IF(NOT _compare_result LESS 0)
    42   IF(${Boost_VERSION} LESS 103700)
    43     MESSAGE(STATUS "Warning: Boost versions earlier than 1.37 may not compile with GCC 4.4 or later!")
    44   ENDIF()
    45 ENDIF()
    4639
    4740# GCC may not support #pragma GCC system_header correctly when using
     
    7265
    7366# CMake doesn't seem to set the PIC flags right on certain 64 bit systems
     67# Todo: MinGW too?
    7468IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
    7569  ADD_COMPILER_FLAGS("-fPIC" CACHE)
     70ENDIF()
     71
     72# Use SSE if possible
     73# Commented because this might not work for cross compiling
     74#CHECK_CXX_COMPILER_FLAG(-msse _gcc_have_sse)
     75#IF(_gcc_have_sse)
     76#  ADD_COMPILER_FLAGS("-msse" CACHE)
     77#ENDIF()
     78
     79IF(NOT MINGW)
     80  # Have GCC visibility?
     81  CHECK_CXX_COMPILER_FLAG("-fvisibility=hidden" _gcc_have_visibility)
     82  IF(_gcc_have_visibility)
     83    # Note: There is a possible bug with the flag in gcc < 4.2 and Debug versions
     84    COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.2.0" _compare_result)
     85    IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" OR _compare_result GREATER -1)
     86      ADD_COMPILER_FLAGS("-DORXONOX_GCC_VISIBILITY -fvisibility=default -fvisibility-inlines-hidden" CACHE)
     87    ENDIF()
     88  ENDIF(_gcc_have_visibility)
    7689ENDIF()
    7790
Note: See TracChangeset for help on using the changeset viewer.