source_group("Source Core" FILES ${SRC_CORE})
source_group("Source Extra" FILES ${SRC_EXTRA})
+# Generate the configure headers.
+# (Place them in the build dir so we don't polute the source tree with generated files).
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
+
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/event-config.h.cmake
- ${CMAKE_CURRENT_SOURCE_DIR}/include/event2/event-config.h)
+ ${CMAKE_CURRENT_BINARY_DIR}/include/event2/event-config.h)
+
+configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/evconfig-private.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/include/evconfig-private.h)
# TODO: Add dynamic versions of the libraries as well.
add_library(event_core STATIC
set(BACKENDS EVPORT KQUEUE EPOLL DEVPOLL POLL SELECT WIN32)
set(DEFAULT_TEST_ENV_VARS "")
foreach(BACKEND ${BACKENDS})
- list(APPEND DEFAULT_TEST_ENV_VARS "EVENT_NO${BACKEND}")
+ list(APPEND DEFAULT_TEST_ENV_VARS "EVENT_NO${BACKEND}=1")
endforeach()
# Macro that creates the ctest test for a backend.
--- /dev/null
+
+#ifndef EVCONFIG_PRIVATE_H_INCLUDED_
+#define EVCONFIG_PRIVATE_H_INCLUDED_
+
+/* Enable extensions on AIX 3, Interix. */
+#cmakedefine _ALL_SOURCE
+
+/* Enable GNU extensions on systems that have them. */
+#cmakedefine _GNU_SOURCE 1
+
+/* Enable threading extensions on Solaris. */
+#cmakedefine _POSIX_PTHREAD_SEMANTICS 1
+
+/* Enable extensions on HP NonStop. */
+#cmakedefine _TANDEM_SOURCE 1
+
+/* Enable general extensions on Solaris. */
+#cmakedefine __EXTENSIONS__
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#cmakedefine _FILE_OFFSET_BITS 1
+/* Define for large files, on AIX-style hosts. */
+#cmakedefine _LARGE_FILES 1
+
+/* Define to 1 if on MINIX. */
+#cmakedefine _MINIX 1
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#cmakedefine _POSIX_1_SOURCE 1
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#cmakedefine _POSIX_SOURCE 1
+
+#endif