aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:00:37 +0200
committerRobert Tari <robert@tari.in>2021-08-30 02:22:48 +0200
commitb5eb9d53363aa61c55de99157158f9754349cd3f (patch)
tree944d95fc5a2dd84c735658bc7f2d0c775eb50591 /tests
parent71b4866df5e9089b778fffc624a80269b9f47067 (diff)
downloadayatana-indicator-datetime-b5eb9d53363aa61c55de99157158f9754349cd3f.tar.gz
ayatana-indicator-datetime-b5eb9d53363aa61c55de99157158f9754349cd3f.tar.bz2
ayatana-indicator-datetime-b5eb9d53363aa61c55de99157158f9754349cd3f.zip
tests/CMakeLists.txt: Move -no-pie flag from CXX flags to target linker options.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3a476e6..e3c7a62 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,6 @@
find_package(GMock REQUIRED)
-SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-pie -std=c++11 ${COMPILE_FLAGS}")
+SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${COMPILE_FLAGS}")
# dbustest
pkg_check_modules(DBUSTEST REQUIRED
@@ -39,6 +39,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}.cpp gschemas.compiled)
+ target_link_options(${TEST_NAME} PRIVATE -no-pie)
add_test (${TEST_NAME} ${TEST_NAME})
target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
endfunction()
@@ -75,6 +76,7 @@ if(HAVE_UT_ACCTSERVICE_SYSTEMSOUND_SETTINGS)
set (TEST_NAME manual-test-snap)
set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME})
add_executable (${TEST_NAME} ${TEST_NAME}.cpp)
+ target_link_options(${TEST_NAME} PRIVATE -no-pie)
target_link_libraries (${TEST_NAME} indicatordatetimeservice ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
endif()
@@ -90,6 +92,7 @@ function(add_eds_ics_test_by_name name)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${TEST_NAME}.ics.in"
"${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.ics")
add_executable(${TEST_NAME} ${TEST_NAME}.cpp gschemas.compiled)
+ target_link_options(${TEST_NAME} PRIVATE -no-pie)
target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
add_test (${TEST_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/run-eds-ics-test.sh