aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-10 21:51:15 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-10 21:51:15 +0200
commitbad62953b420496fa33f9ede9db45b7e51967d11 (patch)
tree0ad743c460a1f5cfa81f7746f4bf7bd97d980beb
parent0e8c18ce4a96cbf4bc85e92c3d323050d8903026 (diff)
parent9ed2cfff005478242fbf23bd008d7eddb8d9d11e (diff)
downloadayatana-indicator-power-bad62953b420496fa33f9ede9db45b7e51967d11.tar.gz
ayatana-indicator-power-bad62953b420496fa33f9ede9db45b7e51967d11.tar.bz2
ayatana-indicator-power-bad62953b420496fa33f9ede9db45b7e51967d11.zip
Merge branch 'tari01-pr/no-pie-only-in-tests'
Attributes GH PR #36: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/36
-rw-r--r--tests/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 1e35481..1dc8a8f 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,8 +1,6 @@
find_package(GMock)
include_directories(${GMOCK_INCLUDE_DIRS})
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-pie")
-
# dbustest
pkg_check_modules(DBUSTEST REQUIRED
dbustest-1>=14.04.0)
@@ -45,6 +43,7 @@ function(add_test_by_name name)
set (TEST_NAME ${name})
set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME} PARENT_SCOPE)
add_executable (${TEST_NAME} ${TEST_NAME}.cc)
+ target_link_options(${TEST_NAME} PRIVATE -no-pie)
add_test (${TEST_NAME} ${TEST_NAME})
add_dependencies (${TEST_NAME} ayatanaindicatorpowerservice gschemas-compiled)
target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})