bzr branch
http://darksoft.org/webbzr/alps/fastwriter
1
by Suren A. Chilingaryan
Initial release |
1 |
project(fastwriter) |
2 |
||
9
by Suren A. Chilingaryan
Support XFS RealTime partition |
3 |
set(FASTWRITER_VERSION "0.0.2") |
1
by Suren A. Chilingaryan
Initial release |
4 |
set(FASTWRITER_ABI_VERSION "0") |
5 |
||
6 |
cmake_minimum_required(VERSION 2.8) |
|
7 |
||
13
by Suren A. Chilingaryan
AIO support |
8 |
set(DISABLE_AIO TRUE CACHE BOOL "Use kernel AIO writer") |
9
by Suren A. Chilingaryan
Support XFS RealTime partition |
9 |
set(DISABLE_XFS_REALTIME FALSE CACHE BOOL "Disable support of RealTime XFS partition") |
12.1.2
by Suren A. Chilingaryan
Seems new memcpy is only good for ipepdvcompute2, make it optional and disabled by default |
10 |
set(USE_CUSTOM_MEMCPY FALSE CACHE BOOL "Use custom memcpy routine instead of stanadrd") |
1
by Suren A. Chilingaryan
Initial release |
11 |
|
12 |
include(CheckIncludeFiles) |
|
13 |
check_include_files("linux/falloc.h" HAVE_LINUX_FALLOC_H) |
|
14 |
||
9
by Suren A. Chilingaryan
Support XFS RealTime partition |
15 |
if (NOT DISABLE_XFS_REALTIME) |
16 |
check_include_files("xfs/xfs.h" HAVE_XFS_H) |
|
17 |
if (NOT HAVE_XFS_H) |
|
18 |
message(FATAL_ERROR "error: xfs/xfs.h is not found...") |
|
19 |
endif (NOT HAVE_XFS_H) |
|
20 |
endif (NOT DISABLE_XFS_REALTIME) |
|
21 |
||
6
by Suren A. Chilingaryan
Adjust cmake scripts |
22 |
include_directories( |
23 |
${CMAKE_SOURCE_DIR}/src |
|
24 |
${CMAKE_CURRENT_BINARY_DIR} |
|
25 |
)
|
|
26 |
||
1
by Suren A. Chilingaryan
Initial release |
27 |
add_definitions("-fPIC --std=c99 -Wall -O2 -pthread") |
28 |
||
6
by Suren A. Chilingaryan
Adjust cmake scripts |
29 |
set(HEADERS fastwriter.h sysinfo.h default.h private.h) |
13
by Suren A. Chilingaryan
AIO support |
30 |
set(SOURCES fastwriter.c sysinfo.c default.c) |
31 |
||
12.1.2
by Suren A. Chilingaryan
Seems new memcpy is only good for ipepdvcompute2, make it optional and disabled by default |
32 |
if (USE_CUSTOM_MEMCPY) |
14
by Suren A. Chilingaryan
Merge custom memcpy |
33 |
set(HEADERS ${HEADERS} memcpy.h) |
34 |
set(SOURCES ${SOURCES} memcpy.c) |
|
12.1.2
by Suren A. Chilingaryan
Seems new memcpy is only good for ipepdvcompute2, make it optional and disabled by default |
35 |
endif (USE_CUSTOM_MEMCPY) |
36 |
||
13
by Suren A. Chilingaryan
AIO support |
37 |
if (NOT DISABLE_AIO) |
38 |
check_include_files("libaio.h" HAVE_LIBAIO_H) |
|
39 |
if (NOT HAVE_LIBAIO_H) |
|
40 |
message(FATAL_ERROR "error: libaio.h is not found...") |
|
41 |
endif (NOT HAVE_LIBAIO_H) |
|
42 |
endif (NOT DISABLE_AIO) |
|
43 |
||
44 |
add_library(fastwriter SHARED ${SOURCES}) |
|
1
by Suren A. Chilingaryan
Initial release |
45 |
|
46 |
set_target_properties(fastwriter PROPERTIES |
|
47 |
VERSION ${FASTWRITER_VERSION} |
|
48 |
SOVERSION ${FASTWRITER_ABI_VERSION} |
|
49 |
LINK_FLAGS "-pthread" |
|
50 |
)
|
|
51 |
||
13
by Suren A. Chilingaryan
AIO support |
52 |
if (NOT DISABLE_AIO) |
53 |
target_link_libraries(fastwriter aio) |
|
54 |
endif (NOT DISABLE_AIO) |
|
55 |
||
1
by Suren A. Chilingaryan
Initial release |
56 |
set(TARNAME "fastwriter") |
57 |
set(PACKAGE_VERSION ${FASTWRITER_VERSION}) |
|
58 |
set(PACKAGE_NAME "${TARNAME}") |
|
59 |
set(PACKAGE_TARNAME "${TARNAME}") |
|
60 |
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") |
|
61 |
set(PACKAGE_BUGREPORT "http://ufo.kit.edu/ufo/newticket") |
|
62 |
||
63 |
if(NOT DEFINED BIN_INSTALL_DIR) |
|
64 |
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") |
|
65 |
endif(NOT DEFINED BIN_INSTALL_DIR) |
|
66 |
||
67 |
if(NOT DEFINED LIB_INSTALL_DIR) |
|
68 |
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") |
|
69 |
endif(NOT DEFINED LIB_INSTALL_DIR) |
|
70 |
||
71 |
if(NOT DEFINED INCLUDE_INSTALL_DIR) |
|
12
by Suren A. Chilingaryan
Fix INCLUDE_INSTALL_DIR |
72 |
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") |
1
by Suren A. Chilingaryan
Initial release |
73 |
endif(NOT DEFINED INCLUDE_INSTALL_DIR) |
74 |
||
75 |
if(NOT DEFINED LOCALE_INSTALL_DIR) |
|
76 |
set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale/") |
|
77 |
endif(NOT DEFINED LOCALE_INSTALL_DIR) |
|
78 |
||
79 |
configure_file(fastwriter.pc.in ${CMAKE_CURRENT_BINARY_DIR}/fastwriter.pc) |
|
80 |
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) |
|
81 |
||
82 |
install(TARGETS fastwriter |
|
83 |
LIBRARY DESTINATION lib${LIB_SUFFIX} |
|
84 |
)
|
|
85 |
||
86 |
install(FILES fastwriter.h |
|
87 |
DESTINATION include |
|
88 |
)
|
|
89 |
||
90 |
install(FILES |
|
91 |
${CMAKE_CURRENT_BINARY_DIR}/fastwriter.pc |
|
92 |
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig |
|
93 |
)
|