From 6472b6f79c7bada6d7d18891d7d6333196e454e8 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 10 Aug 2021 00:45:52 +0200 Subject: Use -no-pie build flag for tests only --- tests/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1e81bc2..f03b98e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,5 @@ find_package(GMock) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-pie") - # build the necessary schemas set_directory_properties (PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled) @@ -51,6 +49,7 @@ add_custom_target( # test-service add_executable (test-service test-service.cc) +target_link_options(test-service PRIVATE -no-pie) set_target_properties (test-service PROPERTIES COMPILE_FLAGS " -std=c++0x") add_test (test-service test-service) add_dependencies (test-service libayatanaindicatorsessionservice backendmock gschemas-compiled) -- cgit v1.2.3