From 518ac7f5279139731aeaaf5ad742a9d45ff6e0d5 Mon Sep 17 00:00:00 2001 From: Bernd Wachter Date: Thu, 28 Jan 2010 15:27:15 +0100 Subject: Add minimal debug flags for Windows release builds; move definition of flags to src/ --- src/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e101db0c..82befb21 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,17 @@ FIND_PACKAGE(PhysFS REQUIRED) FIND_PACKAGE(PNG REQUIRED) FIND_PACKAGE(Gettext REQUIRED) +IF (CMAKE_COMPILER_IS_GNUCXX) + # Help getting compilation warnings + SET(CMAKE_CXX_FLAGS "-Wall") + IF (WIN32) + # This includes enough debug information to get something useful + # from Dr. Mingw while keeping binary size down. Almost useless + # with gdb, though. + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -ggdb0 -gstabs2") + ENDIF() +ENDIF() + SET(FLAGS "-DPACKAGE_VERSION=\\\"${VERSION}\\\"") SET(FLAGS "${FLAGS} -DPKG_DATADIR=\\\"${PKG_DATADIR}/\\\"") SET(FLAGS "${FLAGS} -DLOCALEDIR=\\\"${LOCALEDIR}/\\\"") -- cgit v1.2.3-70-g09d2