mutt_enter_string is only used for _mutt_get_field for real.
[apps/madmutt.git] / CMakeLists.txt
index 229f832..9e0e34d 100644 (file)
@@ -5,11 +5,11 @@ SET(PACKAGE madmutt)
 
 # Using Phobos OR Tango (can be specified from cmake command line)
 if (NOT CMAKE_D_USE_PHOBOS AND NOT CMAKE_D_USE_TANGO)
-       # default to phobos
-       message(STATUS "This application can be built with either Phobos or Tango!")
-       message(STATUS "You did not specify a standard library -- defaulting to Phobos.")
-       message(STATUS "If you wish to use Tango add -DCMAKE_D_USE_TANGO=True to cmake command line.")
-       set(CMAKE_D_USE_PHOBOS True)
+    # default to phobos
+    message(STATUS "This application can be built with either Phobos or Tango!")
+    message(STATUS "You did not specify a standard library -- defaulting to Phobos.")
+    message(STATUS "If you wish to use Tango add -DCMAKE_D_USE_TANGO=True to cmake command line.")
+    set(CMAKE_D_USE_PHOBOS True)
 endif (NOT CMAKE_D_USE_PHOBOS AND NOT CMAKE_D_USE_TANGO)
 
 INCLUDE(CMakeDetermineCCompiler)
@@ -26,7 +26,7 @@ SET(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/share/madmutt")
 SET(PKGDOCDIR  "${CMAKE_INSTALL_PREFIX}/share/doc/madmutt")
 SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
 SET(VERSION    "devel")
-SET(MUTTLIBS)
+SET(MUTTLIBS   "-lutil")
 
 ADD_DEFINITIONS("-DBINDIR=\\\"${BINDIR}\\\"")
 ADD_DEFINITIONS("-DPKGDATADIR=\\\"${PKGDATADIR}\\\"")
@@ -37,7 +37,6 @@ ADD_DEFINITIONS("-DMUTTLOCALEDIR=\\\"${DATADIR}/locale\\\"")
 
 SET(MAILPATH         CACHE STRING "Where new mail is spooled")
 OPTION(WITH_GPGME    "Use GPGME [default: on]" ON)
-OPTION(WITH_NNTP     "Build NNTP support [default: off]")
 OPTION(WITH_IDN      "Use GNU libidn for domain names [default: off]")
 
 OPTION(USE_FLOCK     "Use flock to lock files [default: off]")
@@ -207,11 +206,6 @@ IF(USE_HCACHE)
     ENDIF(NOT USE_HCACHE)
 ENDIF(USE_HCACHE)
 
-IF(WITH_NNTP AND NOT USE_NNTP)
-    SET(USE_NNTP 1)
-    MESSAGE(STATUS "building NNTP support")
-ENDIF(WITH_NNTP AND NOT USE_NNTP)
-
 # }}}
 # C flags {{{
 # big debug flags
@@ -260,6 +254,34 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes")
 # warn about functions without format attribute that should have one
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-format-attribute")
 # }}}
+# D flags {{{
+# big debug flags
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -ggdb3")
+# Use pipes and not temp files.
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -pipe")
+# optimize even more
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -O2")
+# let the type char be unsigned by default
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -funsigned-char")
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -fstrict-aliasing")
+# turn on all common warnings
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wall")
+# turn on extra warnings
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -W")
+# treat warnings as errors
+#SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Werror")
+# warn about local variable shadowing another local variable
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wshadow")
+# warn about casting of pointers to increased alignment requirements
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wcast-align")
+# warn about comparisons between signed and unsigned values
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wsign-compare")
+# warn about unused declared stuff
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wunused")
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wno-unused-parameter")
+# warn about variable use before initialization
+SET(CMAKE_D_FLAGS "${CMAKE_D_FLAGS} -Wuninitialized")
+# }}}
 
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
 
@@ -311,11 +333,6 @@ MADMUTT_SOURCES(madmuttsrc madmuttgen
 
     main.c
 )
-IF(WITH_NNTP)
-    MADMUTT_SOURCES(madmuttsrc madmuttgen
-        nntp.c
-    )
-ENDIF(WITH_NNTP)
 
 STRING(REGEX REPLACE ";" " " MUTTLIBS "${MUTTLIBS}")
 ADD_EXECUTABLE(madmutt ${madmuttsrc})