X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=30e592969cf60199ed72c82085e098c5fcbfff38;hb=9d8830c7ea9fd00ded77072cdfd333c5c4e39813;hp=3acea5cc27cdb34205cf2b1498079a8bfcc912dd;hpb=3da81770b841f841c5145f91a9ccedc296e13f4b;p=onak.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 3acea5c..30e5929 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1 FATAL_ERROR) -project(onak VERSION 0.6.0 LANGUAGES C) +project(onak VERSION 0.6.2 LANGUAGES C) include(CheckSymbolExists) include(FindPkgConfig) @@ -23,6 +23,21 @@ option(KEYD set(CMAKE_POSITION_INDEPENDENT_CODE ON) TEST_BIG_ENDIAN(WORDS_BIGENDIAN) +include(CheckCSourceCompiles) +check_c_source_compiles( + " + #include + static void f(__attribute__((unused))) {} + int main(void) { f(); return 0;} + " + HAVE___ATTRIBUTE__UNUSED +) +if (HAVE___ATTRIBUTE__UNUSED) + set(UNUSED_ATTRIB "__attribute__((unused))") +else() + set(UNUSED_ATTRIB "") +endif() + # Pick up a git based version number for development builds find_package(Git) if (GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git") @@ -36,9 +51,9 @@ endif() # Core objects add_library(libonak STATIC armor.c charfuncs.c cleankey.c cleanup.c decodekey.c - getcgi.c hash.c keyarray.c keyid.c keyindex.c ll.c log.c marshal.c - mem.c merge.c onak-conf.c parsekey.c photoid.c rsa.c sigcheck.c sendsync.c - sha1x.c wordlist.c) + getcgi.c hash.c hash-helper.c key-store.c keyarray.c keyid.c keyindex.c + ll.c log.c marshal.c mem.c merge.c onak-conf.c parsekey.c photoid.c + rsa.c sigcheck.c sendsync.c sha1x.c wordlist.c) set(LIBONAK_LIBRARIES "") # Ideally use Nettle, fall back to our own md5/sha1 routines otherwise