Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2223


Ignore:
Timestamp:
Nov 19, 2008, 3:35:46 PM (16 years ago)
Author:
adrfried
Message:

flags for build types defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/CMakeLists.txt

    r2204 r2223  
    22
    33CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
    4 
    5 # TODO: Test CMake Modules without policy
    6 #IF (COMMAND cmake_policy)
    7 #  cmake_policy(SET CMP0003 NEW)
    8 #ENDIF (COMMAND cmake_policy)
    94
    105# This sets where to look for modules (e.g. "Find*.cmake" files)
     
    3227MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
    3328
    34 # TODO: use CMake's options for build types
    35 # Global compiler/linker flags.
    36 SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb")
    37 SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wall -Wextra -Wno-unused-parameter -g -ggdb")
    38 #SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O3")
    39 #SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O3")
     29# Compiler/Linker flags.
     30IF(NOT CMAKE_BUILD_TYPE)
     31  SET(CMAKE_BUILD_TYPE "Debug")
     32ENDIF(NOT CMAKE_BUILD_TYPE)
     33SET(CMAKE_C_FLAGS   "$ENV{CFLAGS}   -Wall -Wextra -Wno-unused-parameter")
     34SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -Wall -Wextra -Wno-unused-parameter")
     35SET(CMAKE_C_FLAGS_DEBUG            "-g -ggdb")
     36SET(CMAKE_CXX_FLAGS_DEBUG          "-g -ggdb")
     37SET(CMAKE_C_FLAGS_RELEASE          "-O3")
     38SET(CMAKE_CXX_FLAGS_RELEASE        "-O3")
     39SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -ggdb")
     40SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -ggdb")
     41SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os")
     42SET(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os")
    4043
    4144SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
Note: See TracChangeset for help on using the changeset viewer.