From 4fc23df6bdc29eb19df509641b116c8ff21a292e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Wed, 21 Jan 2015 20:25:59 +0100 Subject: [PATCH] Cleanup --- CMakeLists.txt | 26 +------------------------- config.h.in | 16 +++------------- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aa4c55..d819536 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,14 +7,7 @@ cmake_policy (VERSION 2.8) # Options option (OPTION_USE_VERA "Use vera++ for source code style checks" OFF) option (OPTION_NOINSTALL "Only for developers; work without installing" OFF) - -if (OPTION_NOINSTALL) - set (OPTION_NOINSTALL 1) -else (OPTION_NOINSTALL) - set (OPTION_NOINSTALL 0) -endif (OPTION_NOINSTALL) - -add_definitions (-DGSEAL_ENABLE) +option (BUILD_TESTING "Build tests" OFF) # Project information set (project_VERSION_MAJOR "0") @@ -30,20 +23,6 @@ set (project_URL "http://github.com/pjanouch/logdiag") # For custom modules set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -# Test this machine -include (CheckCSourceCompiles) - -CHECK_C_SOURCE_COMPILES ( -"typedef struct abc *d; -int test (d __restrict x); -int main (void) {return 0;}" -HAVE_SANE___RESTRICT) - -CHECK_C_SOURCE_COMPILES ( -"int test (void *restrict x); -int main (void) {return 0;}" -HAVE_RESTRICT) - # Automatic retrieval of dependencies if (WIN32) set (WIN32_DEPENDS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/win32-depends) @@ -130,7 +109,6 @@ foreach (file ${project_PO_FILES}) endforeach (file) # Documentation -# TODO: Add pregenerated docs to the tree find_package (GtkDoc) set (project_DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/docs/reference") @@ -262,8 +240,6 @@ add_executable (logdiag WIN32 ${logdiag_SOURCES} ${logdiag_HEADERS}) target_link_libraries (logdiag liblogdiag m ${logdiag_LIBS}) # Testing -option (BUILD_TESTING "Build tests" OFF) - if (BUILD_TESTING) enable_testing () diff --git a/config.h.in b/config.h.in index 665ddec..9ddcf53 100644 --- a/config.h.in +++ b/config.h.in @@ -12,7 +12,9 @@ #define PROJECT_VERSION "${project_VERSION}" #define PROJECT_URL "${project_URL}" -#if ${OPTION_NOINSTALL} +#cmakedefine OPTION_NOINSTALL + +#ifdef OPTION_NOINSTALL /* For developers. */ #define PROJECT_SHARE_DIR "${CMAKE_SOURCE_DIR}/share/" #define PROJECT_GSETTINGS_DIR "${CMAKE_BINARY_DIR}" @@ -23,10 +25,6 @@ #endif -#cmakedefine HAVE_SANE___RESTRICT -#cmakedefine HAVE_RESTRICT - - #include #define GETTEXT_DOMAIN "${PROJECT_NAME}" @@ -37,14 +35,6 @@ #endif -#ifndef HAVE_SANE___RESTRICT - #ifdef HAVE_RESTRICT - #define __restrict restrict - #else - #define __restrict - #endif -#endif /* ! HAVE_SANE___RESTRICT */ - /* We have to remove nodes first due to a bug in json-glib. */ #define json_object_set_member(object, name, node) \ G_STMT_START { \