diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-09-11 11:26:50 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-09-11 16:52:02 +0200 |
commit | 7b8d5c42e29282ce47775645ef5b934475df4d37 (patch) | |
tree | 12645d91b7091a236ab630eb45f674baf4632c82 /example | |
parent | 21dd16562fddb3bef5d0dd91c5bf3533b2b533fc (diff) | |
download | cmocka-7b8d5c42e29282ce47775645ef5b934475df4d37.tar.gz cmocka-7b8d5c42e29282ce47775645ef5b934475df4d37.tar.xz cmocka-7b8d5c42e29282ce47775645ef5b934475df4d37.zip |
cmake: Fix linking with -fstack-protector* on Solaris
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'example')
-rw-r--r-- | example/uptime/CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/example/uptime/CMakeLists.txt b/example/uptime/CMakeLists.txt index 99924bd..cab1e88 100644 --- a/example/uptime/CMakeLists.txt +++ b/example/uptime/CMakeLists.txt @@ -9,13 +9,19 @@ add_library(proc_uptime proc_uptime.c) add_executable(uptime uptime.c) target_compile_options(uptime PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) target_link_libraries(uptime proc_uptime) +set_property(TARGET + uptime + PROPERTY + LINK_FLAGS + "${DEFAULT_LINK_FLAGS}") add_executable(test_uptime test_uptime.c) target_compile_options(test_uptime PRIVATE ${DEFAULT_C_COMPILE_FLAGS}) target_link_libraries(test_uptime ${CMOCKA_SHARED_LIBRARY}) - -set_target_properties(test_uptime - PROPERTIES - LINK_FLAGS "-Wl,--wrap=uptime") +set_property(TARGET + test_uptime + PROPERTY + LINK_FLAGS + "${DEFAULT_LINK_FLAGS} -Wl,--wrap=uptime") add_test(test_uptime ${CMAKE_CURRENT_BINARY_DIR}/test_uptime) |