diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-29 14:00:37 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-30 00:48:02 +0200 |
commit | 5650c6f97d7e4a5b085aeaa68cc4af4793a23d87 (patch) | |
tree | 3e12379292ce2925b40344dfefc33d8356d197d6 | |
parent | 11f11fcf01b0add9ffb766ca7ea48eb9e27cbb0c (diff) | |
download | ayatana-indicator-datetime-5650c6f97d7e4a5b085aeaa68cc4af4793a23d87.tar.gz ayatana-indicator-datetime-5650c6f97d7e4a5b085aeaa68cc4af4793a23d87.tar.bz2 ayatana-indicator-datetime-5650c6f97d7e4a5b085aeaa68cc4af4793a23d87.zip |
tests/CMakeLists.txt: Move -no-pie flag from CXX flags to target linker options.
-rw-r--r-- | tests/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 71235dd..4a38890 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() @@ -67,6 +68,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() @@ -82,6 +84,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 |