-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (29 loc) · 945 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
cmake_minimum_required(VERSION 2.6)
project(factowiththtreads)
include_directories(${PROJECT_SOURCE_DIR})
set(PROJ_SOURCES
src/factorial_thread.cpp
src/factorial_main.cpp
)
set(PROJ_LIBS
pthread
)
set (target_name ${PROJECT_NAME})
message("CMAKE_PROJECT_NAME = ${CMAKE_PROJECT_NAME}")
message("PROJECT_NAME = ${PROJECT_NAME}")
message("target_name = ${target_name}")
add_executable(${target_name} ${PROJ_SOURCES})
target_link_libraries(${target_name} ${PROJ_LIBS})
install(TARGETS ${target_name} DESTINATION usr/bin)
################################
# CTest
################################
# enable_testing()
# OR
include(CTest)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/tests)
set(CTEST_BINARY_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
add_subdirectory(tests)
#add_library(${target_name} SHARED ${PROJ_SOURCES})
#target_link_libraries(${target_name} ${PROJ_LIBS})
#install(TARGETS ${target_name} DESTINATION usr/lib)