-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
49 lines (40 loc) · 922 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
cmake_minimum_required(VERSION 2.8)
project(qfilt)
set(INSTALL_PREFIX /usr/local CACHE PATH "Installation prefix")
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE INTERNAL "Installation prefix" FORCE)
set(CMAKE_CONFIGURATION_TYPES Release)
include_directories(
src/
)
add_executable(
qfilt
src/main.cpp
src/argparse.cpp
src/seq.cpp
src/str.cpp
src/strtok.cpp
)
target_link_libraries(qfilt m)
# do not remove -Wall and -Werror: please fix the errors instead of being lazy
set_target_properties(
qfilt
PROPERTIES
COMPILE_FLAGS "-O3 -Wall -Werror"
)
install(
TARGETS qfilt
RUNTIME DESTINATION bin
OPTIONAL
)
find_program(
ASTYLE
astyle
PATHS ENV PATH
)
if(ASTYLE)
add_custom_target(
style
COMMAND ${ASTYLE} --options=astyle.txt --suffix=none --recursive 'src/*.cpp' 'src/*.hpp' 'src/*.tpp'
DEPENDS astyle.txt
)
endif(ASTYLE)