This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch feature/error_injector
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/error_injector by this 
push:
     new 767e3f45 Use more portable way to specify linker options.
767e3f45 is described below

commit 767e3f45f15dbecf2488c4846624685d86d88aa5
Author: PengZheng <[email protected]>
AuthorDate: Fri Jan 20 10:16:42 2023 +0800

    Use more portable way to specify linker options.
---
 misc/error_injector/celix_properties/CMakeLists.txt | 2 +-
 misc/error_injector/malloc/CMakeLists.txt           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/misc/error_injector/celix_properties/CMakeLists.txt 
b/misc/error_injector/celix_properties/CMakeLists.txt
index c85bf74a..03ddb235 100644
--- a/misc/error_injector/celix_properties/CMakeLists.txt
+++ b/misc/error_injector/celix_properties/CMakeLists.txt
@@ -20,4 +20,4 @@ add_library(celix_properties_ei STATIC 
celix_properties_ei.cpp)
 target_include_directories(celix_properties_ei PUBLIC 
${CMAKE_CURRENT_LIST_DIR})
 target_link_libraries(celix_properties_ei PUBLIC error_injector Celix::utils)
 # It plays nicely with address sanitizer this way.
-target_link_options(celix_properties_ei INTERFACE 
-Wl,-wrap,celix_properties_create)
\ No newline at end of file
+target_link_options(celix_properties_ei INTERFACE 
LINKER:--wrap,celix_properties_create)
\ No newline at end of file
diff --git a/misc/error_injector/malloc/CMakeLists.txt 
b/misc/error_injector/malloc/CMakeLists.txt
index 543060bc..f83027ac 100644
--- a/misc/error_injector/malloc/CMakeLists.txt
+++ b/misc/error_injector/malloc/CMakeLists.txt
@@ -20,4 +20,4 @@ add_library(malloc_ei STATIC malloc_ei.cpp)
 target_include_directories(malloc_ei PUBLIC ${CMAKE_CURRENT_LIST_DIR})
 target_link_libraries(malloc_ei PUBLIC error_injector)
 # It plays nicely with address sanitizer this way.
-target_link_options(malloc_ei INTERFACE -Wl,-wrap,malloc -Wl,-wrap,realloc 
-Wl,-wrap,calloc)
\ No newline at end of file
+target_link_options(malloc_ei INTERFACE LINKER:--wrap,malloc 
LINKER:--wrap,realloc LINKER:--wrap,calloc)
\ No newline at end of file

Reply via email to