Přemysl Janouch 3 years ago
parent
commit
4fc23df6bd
2 changed files with 4 additions and 38 deletions
  1. 1
    25
      CMakeLists.txt
  2. 3
    13
      config.h.in

+ 1
- 25
CMakeLists.txt View File

@@ -7,14 +7,7 @@ cmake_policy (VERSION 2.8)
7 7
 # Options
8 8
 option (OPTION_USE_VERA "Use vera++ for source code style checks" OFF)
9 9
 option (OPTION_NOINSTALL "Only for developers; work without installing" OFF)
10
-
11
-if (OPTION_NOINSTALL)
12
-	set (OPTION_NOINSTALL 1)
13
-else (OPTION_NOINSTALL)
14
-	set (OPTION_NOINSTALL 0)
15
-endif (OPTION_NOINSTALL)
16
-
17
-add_definitions (-DGSEAL_ENABLE)
10
+option (BUILD_TESTING "Build tests" OFF)
18 11
 
19 12
 # Project information
20 13
 set (project_VERSION_MAJOR "0")
@@ -30,20 +23,6 @@ set (project_URL "http://github.com/pjanouch/logdiag")
30 23
 # For custom modules
31 24
 set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
32 25
 
33
-# Test this machine
34
-include (CheckCSourceCompiles)
35
-
36
-CHECK_C_SOURCE_COMPILES (
37
-"typedef struct abc *d;
38
-int test (d __restrict x);
39
-int main (void) {return 0;}"
40
-HAVE_SANE___RESTRICT)
41
-
42
-CHECK_C_SOURCE_COMPILES (
43
-"int test (void *restrict x);
44
-int main (void) {return 0;}"
45
-HAVE_RESTRICT)
46
-
47 26
 # Automatic retrieval of dependencies
48 27
 if (WIN32)
49 28
 	set (WIN32_DEPENDS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/win32-depends)
@@ -130,7 +109,6 @@ foreach (file ${project_PO_FILES})
130 109
 endforeach (file)
131 110
 
132 111
 # Documentation
133
-# TODO: Add pregenerated docs to the tree
134 112
 find_package (GtkDoc)
135 113
 set (project_DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/docs/reference")
136 114
 
@@ -262,8 +240,6 @@ add_executable (logdiag WIN32 ${logdiag_SOURCES} ${logdiag_HEADERS})
262 240
 target_link_libraries (logdiag liblogdiag m ${logdiag_LIBS})
263 241
 
264 242
 # Testing
265
-option (BUILD_TESTING "Build tests" OFF)
266
-
267 243
 if (BUILD_TESTING)
268 244
 	enable_testing ()
269 245
 

+ 3
- 13
config.h.in View File

@@ -12,7 +12,9 @@
12 12
 #define PROJECT_VERSION "${project_VERSION}"
13 13
 #define PROJECT_URL "${project_URL}"
14 14
 
15
-#if ${OPTION_NOINSTALL}
15
+#cmakedefine OPTION_NOINSTALL
16
+
17
+#ifdef OPTION_NOINSTALL
16 18
 	/* For developers. */
17 19
 	#define PROJECT_SHARE_DIR "${CMAKE_SOURCE_DIR}/share/"
18 20
 	#define PROJECT_GSETTINGS_DIR "${CMAKE_BINARY_DIR}"
@@ -23,10 +25,6 @@
23 25
 #endif
24 26
 
25 27
 
26
-#cmakedefine HAVE_SANE___RESTRICT
27
-#cmakedefine HAVE_RESTRICT
28
-
29
-
30 28
 #include <glib/gi18n.h>
31 29
 
32 30
 #define GETTEXT_DOMAIN "${PROJECT_NAME}"
@@ -37,14 +35,6 @@
37 35
 #endif
38 36
 
39 37
 
40
-#ifndef HAVE_SANE___RESTRICT
41
-	#ifdef HAVE_RESTRICT
42
-		#define __restrict restrict
43
-	#else
44
-		#define __restrict
45
-	#endif
46
-#endif /* ! HAVE_SANE___RESTRICT */
47
-
48 38
 /* We have to remove nodes first due to a bug in json-glib. */
49 39
 #define json_object_set_member(object, name, node) \
50 40
 	G_STMT_START { \

Loading…
Cancel
Save