aboutsummaryrefslogtreecommitdiff
path: root/lib/crow/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-01-15 19:12:12 +0800
committerMistivia <i@mistivia.com>2025-01-15 19:12:46 +0800
commit4da382953c830a61ae24ccbe95c4241db8788269 (patch)
tree31f6d184273274e2660516d1ac1146b5661f20b6 /lib/crow/tests/CMakeLists.txt
restore
Diffstat (limited to 'lib/crow/tests/CMakeLists.txt')
-rw-r--r--lib/crow/tests/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/crow/tests/CMakeLists.txt b/lib/crow/tests/CMakeLists.txt
new file mode 100644
index 0000000..65ab230
--- /dev/null
+++ b/lib/crow/tests/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.8)
+project (crow_test)
+
+
+set(TEST_SRCS
+unittest.cpp
+)
+
+add_executable(unittest ${TEST_SRCS})
+#target_link_libraries(unittest crow)
+target_link_libraries(unittest ${Boost_LIBRARIES})
+target_link_libraries(unittest ${CMAKE_THREAD_LIBS_INIT})
+
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+# using Clang
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+# using GCC
+set_target_properties(unittest PROPERTIES COMPILE_FLAGS "--coverage -fprofile-arcs -ftest-coverage")
+target_link_libraries(unittest gcov)
+endif()
+
+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"