From b87d8f470042628ac54386853cf877cec107c141 Mon Sep 17 00:00:00 2001 From: click Date: Wed, 29 Sep 2010 23:42:09 +0200 Subject: Buildsystem: Overhaul of the CMake buildsystem: - utilize CMake for completely generating revision.h (kills off genrev and revision.h targets): - pull and set correct revision-ID/hash from Mercurial (hg) when using regular repository sourcetree - pull and set correct revision-ID/hash from archived releases (when pulled from googlecode) - set and use _BUILD_DIRECTIVE definition (earlier part of revision.h) as compiletime definition - delete genrev and related buildsystems (now deprecated) - Move some files around to adhere to buildsystem structure Thanks to Shauren for figuring out the definition-behaviour for MSVC while he was in the shower --HG-- branch : trunk rename : cmake_uninstall.cmake.in => cmake/platform/unix/cmake_uninstall.in.cmake --- cmake/compiler/gcc/settings.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'cmake/compiler/gcc') diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index a3a3240deb8..e98be5011ff 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -1,3 +1,11 @@ +# build in Release-mode by default if not explicitly set +if( NOT CMAKE_BUILD_TYPE ) + set(CMAKE_BUILD_TYPE "Release") +endif() + +# Set build-directive (used in core to tell which buildtype we used) +add_definitions(-D_BUILD_DIRECTIVE=${CMAKE_BUILD_TYPE}) + add_definitions(-fno-delete-null-pointer-checks) if( USE_SFMT) @@ -6,18 +14,18 @@ if( USE_SFMT) add_definitions(-msse2 -mfpmath=sse) endif() add_definitions(-DHAVE_SSE2 -D__SSE2__) - message(STATUS "- GCC: SFMT enabled, SSE2 flags forced") + message(STATUS "GCC: SFMT enabled, SSE2 flags forced") endif() if( WITH_WARNINGS ) add_definitions(-Wall -Wfatal-errors -Wextra) - message(STATUS "- GCC: All warnings enabled") + message(STATUS "GCC: All warnings enabled") else() add_definitions(--no-warnings) - message(STATUS "- GCC: All warnings disabled") + message(STATUS "GCC: All warnings disabled") endif() if( WITH_COREDEBUG ) add_definitions(-ggdb3) - message(STATUS "- GCC: Debug-flags set (-ggdb3)") + message(STATUS "GCC: Debug-flags set (-ggdb3)") endif() -- cgit v1.2.3