X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-lib%2FCMakeLists.txt;fp=lib-lib%2FCMakeLists.txt;h=a4ca5fe96b5aed6be7ec0aa41fa547587e2d2899;hb=d4b790a79307b4f53c49f4c25223977a8baa6aa1;hp=0000000000000000000000000000000000000000;hpb=eab38ff6950a0075741f24ac9fb0d9eaf7df8671;p=apps%2Fmadmutt.git diff --git a/lib-lib/CMakeLists.txt b/lib-lib/CMakeLists.txt new file mode 100644 index 0000000..a4ca5fe --- /dev/null +++ b/lib-lib/CMakeLists.txt @@ -0,0 +1,61 @@ +# C flags {{{ +# big debug flags +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -ggdb3") +# Use pipes and not temp files. +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -pipe") +# optimize even more +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -O2") +# let the type char be unsigned by default +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -funsigned-char") +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -fstrict-aliasing") +# turn on all common warnings +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wall") +# turn on extra warnings +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} $(if $(GCC4),-Wextra,-W)") +# treat warnings as errors +#SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Werror") +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wchar-subscripts") +# warn about undefined preprocessor identifiers +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wundef") +# warn about local variable shadowing another local variable +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wshadow") +# warn about casting of pointers to increased alignment requirements +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wcast-align") +# make string constants const +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wwrite-strings") +# warn about comparisons between signed and unsigned values +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wsign-compare") +# warn about unused declared stuff +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wunused") +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wno-unused-parameter") +# warn about variable use before initialization +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wuninitialized") +# warn about variables which are initialized with themselves +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Winit-self") +# warn about pointer arithmetic on void* and function pointers +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wpointer-arith") +# warn about multiple declarations +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wredundant-decls") +# warn if the format string is not a string literal +#SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wformat-nonliteral") +# do not warn about zero-length formats. +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wno-format-zero-length") +# missing prototypes +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wmissing-prototypes") +# warn about functions without format attribute that should have one +SET(CMAKE_C_CFLAGS "${CMAKE_C_CFLAGS} -Wmissing-format-attribute") +# }}} +ADD_LIBRARY(lib + str.c + md5.c + utf8.c + buffer.c + hash.c + array.c + list.c + file.c + mapping.c + date.c + rx.c + url.c +)