aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-04 12:34:27 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-05 07:54:36 +0200
commit84d2a71f5c8c5efddb86ab311e1ab0ac5a7e910e (patch)
tree3af89bb39a9be030cb578d44f4f499a51ed5a2a4
parent81325279efcc1ae8826a3cb3909db4d1ae13ee28 (diff)
downloadlibayatana-common-84d2a71f5c8c5efddb86ab311e1ab0ac5a7e910e.tar.gz
libayatana-common-84d2a71f5c8c5efddb86ab311e1ab0ac5a7e910e.tar.bz2
libayatana-common-84d2a71f5c8c5efddb86ab311e1ab0ac5a7e910e.zip
tests/CMakeLists.txt: Drop -no-pie from CXX_FLAGS and add it as a target link option.
-rw-r--r--tests/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4fa6602..0349ae6 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")
-
# gschemas.compiled
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "gschemas.compiled")
@@ -21,6 +19,7 @@ add_custom_target("gschemas-compiled" ALL DEPENDS "gschemas.compiled")
add_executable(tst_utils tst_utils.cpp)
target_compile_definitions(tst_utils PUBLIC SCHEMA_DIR="${CMAKE_CURRENT_BINARY_DIR}")
+target_link_options(tst_utils PRIVATE -no-pie)
add_dependencies(tst_utils "gschemas-compiled")
target_include_directories(tst_utils PUBLIC "${CMAKE_SOURCE_DIR}/src")