2014-08-06 16:18:33 +00:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project (crow_test)
|
|
|
|
|
|
|
|
|
|
|
|
set(TEST_SRCS
|
|
|
|
unittest.cpp
|
|
|
|
)
|
|
|
|
|
2014-08-06 19:46:28 +00:00
|
|
|
add_executable(unittest ${TEST_SRCS})
|
2014-08-06 23:31:27 +00:00
|
|
|
#target_link_libraries(unittest crow)
|
2014-08-06 19:46:28 +00:00
|
|
|
target_link_libraries(unittest ${Boost_LIBRARIES} )
|
|
|
|
|
2014-09-06 19:30:53 +00:00
|
|
|
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
|
|
# using Clang
|
|
|
|
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
|
|
# using GCC
|
2014-08-06 19:46:28 +00:00
|
|
|
set_target_properties(unittest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage")
|
|
|
|
target_link_libraries(unittest gcov)
|
2014-09-06 19:30:53 +00:00
|
|
|
endif()
|
2014-08-06 19:46:28 +00:00
|
|
|
|
|
|
|
add_subdirectory(template)
|
|
|
|
#CXXFLAGS="-g -O0 -Wall -W -Wshadow -Wunused-variable \
|
|
|
|
#Wunused-parameter -Wunused-function -Wunused -Wno-system-headers \
|
|
|
|
#-Wno-deprecated -Woverloaded-virtual -Wwrite-strings -fprofile-arcs -ftest-coverage"
|
|
|
|
#CFLAGS="-g -O0 -Wall -W -fprofile-arcs -ftest-coverage"
|
|
|
|
#LDFLAGS="-fprofile-arcs -ftest-coverage"
|