File: CMakeLists.txt

package info (click to toggle)
assembly-stats 1.0.1%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 256 kB
  • sloc: cpp: 795; sh: 31; makefile: 9
file content (27 lines) | stat: -rw-r--r-- 995 bytes parent folder | download | duplicates (2)
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
cmake_minimum_required (VERSION 2.6)
project (assembly-stats)

set (CMAKE_CXX_FLAGS "-Wall -g -O3 -pthread")

file(COPY test_files DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
#add_subdirectory(gtest-1.7.0)
option(BUILD_TESTS "Parameter to enable/disable build time tests" ON)

if(BUILD_TESTS)
	enable_testing()
	include_directories(/usr/include/gtest)
	add_executable(runUnitTests fasta_unittest.cpp fastq_unittest.cpp filetype_unittest.cpp stats_unittest.cpp)
	target_link_libraries(runUnitTests gtest gtest_main fasta fastq filetype stats)
	add_test(runUnitTests runUnitTests)
endif()

add_library(fasta fasta.cpp)
add_library(fastq fastq.cpp)
add_library(filetype filetype.cpp)
add_library(stats stats.cpp)
target_link_libraries(stats fasta fastq filetype)
add_executable(assembly-stats assembly-stats.cpp)
target_link_libraries(assembly-stats stats)

set(INSTALL_DIR /usr/local/bin CACHE PATH "Installation directory for executables")
install(TARGETS assembly-stats DESTINATION ${INSTALL_DIR})