Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2638 for code


Ignore:
Timestamp:
Feb 7, 2009, 8:03:27 PM (16 years ago)
Author:
rgrieder
Message:

Removed about a thousand lines of warnings when compiling with GCC 3. It's not such a clean workaround but better than polluted output.

Location:
code/branches/buildsystem2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/BuildConfigGCC.cmake

    r2626 r2638  
    2323 #    Sets the right compiler and linker flags for GCC.
    2424 #
     25
     26# Determine compiler version
     27EXEC_PROGRAM(
     28  ${CMAKE_CXX_COMPILER}
     29  ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
     30  OUTPUT_VARIABLE GCC_VERSION
     31)
     32
     33# GCC may not support #pragma GCC system_header correctly when using
     34# templates. According to Bugzilla, it was fixed March 07 but tests
     35# have confirmed that GCC 4.0.0 does not pose a problem for our cases.
     36INCLUDE(CompareVersionStrings)
     37COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.0.0" _compare_result)
     38IF(NOT _compare_result LESS 0)
     39  SET(GCC_SYSTEM_HEADER_SUPPORT TRUE)
     40ENDIF()
    2541
    2642# Also include environment flags. Could cause conflicts though
  • code/branches/buildsystem2/src/core/CMakeLists.txt

    r2634 r2638  
    6868GENERATE_TOLUA_BINDINGS(Core CORE_FILES INPUTFILES LuaBind.h CommandExecutor.h)
    6969
     70IF(NOT GCC_SYSTEM_HEADER_SUPPORT)
     71  # Get around displaying a few hundred lines of warning code
     72  SET_SOURCE_FILES_PROPERTIES(ArgumentCompletionFunctions.cc PROPERTIES COMPILE_FLAGS "-w")
     73ENDIF()
     74
    7075ADD_LIBRARY(core SHARED ${CORE_FILES})
    7176
  • code/branches/buildsystem2/src/orxonox/CMakeLists.txt

    r2634 r2638  
    3939# Not using precompiled header files: Avoid dependencies
    4040INCLUDE_DIRECTORIES(pch/nopch)
     41
     42IF(NOT GCC_SYSTEM_HEADER_SUPPORT)
     43  # Get around displaying a few hundred lines of warning code
     44  SET_SOURCE_FILES_PROPERTIES(gamestates/GSGraphics.cc PROPERTIES COMPILE_FLAGS "-w")
     45ENDIF()
    4146
    4247ADD_EXECUTABLE(orxonox ${ORXONOX_FILES})
  • code/branches/buildsystem2/src/util/CMakeLists.txt

    r2634 r2638  
    5858SOURCE_GROUP("" FILES ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h)
    5959
     60IF(NOT GCC_SYSTEM_HEADER_SUPPORT)
     61  # Get around displaying a few hundred lines of warning code
     62  SET_SOURCE_FILES_PROPERTIES(MultiType.cc PROPERTIES COMPILE_FLAGS "-w")
     63ENDIF()
     64
    6065ADD_LIBRARY(util SHARED ${UTIL_FILES})
    6166SET_TARGET_PROPERTIES(util PROPERTIES DEFINE_SYMBOL "UTIL_SHARED_BUILD")
Note: See TracChangeset for help on using the changeset viewer.