This commit is contained in:
Přemysl Eric Janouch 2015-01-21 20:25:59 +01:00
parent 4d0721bf68
commit 4fc23df6bd
2 changed files with 4 additions and 38 deletions

View File

@ -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 ()

View File

@ -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 { \