aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-04-21 22:12:42 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-04-21 22:12:42 +0200
commitfcf633bdbc0b7d64fe1ea6005ab007f0db151c4e (patch)
tree359d2cc514826fb177cec39f6303d66649af56d4 /tests/CMakeLists.txt
parent34e808d3b9a322db3908454944c69c1373572f66 (diff)
parent3adf9ec33ba1e5b6516dfb31f943da67926e86c7 (diff)
downloadayatana-ido-fcf633bdbc0b7d64fe1ea6005ab007f0db151c4e.tar.gz
ayatana-ido-fcf633bdbc0b7d64fe1ea6005ab007f0db151c4e.tar.bz2
ayatana-ido-fcf633bdbc0b7d64fe1ea6005ab007f0db151c4e.zip
Merge branch 'tari01-pr/switch-to-cmake'
Attributes GH PR #26: https://github.com/AyatanaIndicators/ayatana-ido/pull/26
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..39cde1f
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,32 @@
+find_package(GMock)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-pie")
+
+# gtest-menuitems
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/src
+ ${PROJECT_DEPS_INCLUDE_DIRS}
+)
+
+set_source_files_properties(gtest-menuitems.cpp PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
+
+add_executable("gtest-menuitems" gtest-menuitems.cpp)
+target_link_libraries("gtest-menuitems"
+ ayatana-ido3-0.4
+
+ ${PROJECT_DEPS_LIBRARIES}
+
+ ${GTEST_LIBRARIES}
+ ${GTEST_BOTH_LIBRARIES}
+ ${GMOCK_LIBRARIES}
+)
+add_test("gtest-menuitems" "gtest-menuitems")
+add_dependencies("gtest-menuitems" ayatana-ido3-0.4)
+
+
+# coverage
+if (ENABLE_COVERAGE)
+ find_package(CoverageReport)
+ ENABLE_COVERAGE_REPORT(TARGETS "gtest-menuitems" TESTS "gtest-menuitems")
+endif()