From 95d2a880c3b16d824162e1ae6dc67f329aad4903 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 10 Aug 2021 00:21:38 +0200 Subject: Use -no-pie build flags for test only --- tests/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a31f789..eb6cff1 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") - # gtest-menuitems include_directories( @@ -12,6 +10,7 @@ include_directories( set_source_files_properties(gtest-menuitems.cpp PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS}) add_executable("gtest-menuitems" gtest-menuitems.cpp) +target_link_options("gtest-menuitems" PRIVATE -no-pie) target_link_libraries("gtest-menuitems" ayatana-ido3-0.4 -- cgit v1.2.3