From 349103480edff4da1dfd22913d568a5c135922a1 Mon Sep 17 00:00:00 2001 From: kiumars Date: Wed, 2 Feb 2022 16:52:44 -0800 Subject: [PATCH] replace the set of CMAKE_SHARED_LINKER_FLAGS with add_link_options. Change-Id: Iaf8fc1d7680196662d610f34979ded07c6287df9 [ROCm/rocprofiler commit: 5693e1a140d0934399c355fb09aa37de5688e5b1] --- projects/rocprofiler/cmake_modules/env.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocprofiler/cmake_modules/env.cmake b/projects/rocprofiler/cmake_modules/env.cmake index f5295741da..26168ac0ee 100644 --- a/projects/rocprofiler/cmake_modules/env.cmake +++ b/projects/rocprofiler/cmake_modules/env.cmake @@ -51,7 +51,7 @@ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=unused-result" ) #set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=int-in-bool-context" ) set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) -set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bdynamic -Wl,-z,noexecstack" ) +add_link_options ("-Bdynamic -z,neexecstack") set ( CMAKE_SKIP_BUILD_RPATH TRUE )