-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
37 lines (27 loc) · 954 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
cmake_minimum_required(VERSION 3.10)
project(text)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
include_directories(include)
file(GLOB SOURCES
src/*.cpp
)
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/catch.cpp")
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/bufferTest.cpp")
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/InputProcessorTest.cpp")
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/test.cpp")
list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
add_executable(text ${SOURCES} src/main.cpp)
find_library(NCURSES_LIBRARY NAMES ncurses)
target_link_libraries(text ${NCURSES_LIBRARY})
enable_testing()
add_executable(test_all
${SOURCES}
src/test.cpp
src/catch.cpp
src/bufferTest.cpp
src/InputProcessorTest.cpp
)
target_link_libraries(test_all ${NCURSES_LIBRARY})
add_test(NAME test_all COMMAND test)
install(TARGETS text RUNTIME DESTINATION bin)