aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-01-21 20:25:59 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-01-21 20:25:59 +0100
commit4fc23df6bdc29eb19df509641b116c8ff21a292e (patch)
treef19f820ab320e9a47599b3abb623abc98c478882
parent4d0721bf68908eb07babdd8f0851b31475d6ea64 (diff)
downloadlogdiag-4fc23df6bdc29eb19df509641b116c8ff21a292e.tar.gz
logdiag-4fc23df6bdc29eb19df509641b116c8ff21a292e.tar.xz
logdiag-4fc23df6bdc29eb19df509641b116c8ff21a292e.zip
Cleanup
-rw-r--r--CMakeLists.txt26
-rw-r--r--config.h.in16
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 <glib/gi18n.h>
#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 { \