From d2c0818545b390d06de85a3e9b6a2957c7667c2c Mon Sep 17 00:00:00 2001 From: Tao He Date: Fri, 17 Feb 2023 17:04:53 +0800 Subject: [PATCH] It should be linker flags, suppressing the clang warnings (#104) Signed-off-by: Tao He --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e531b0cd4..b2384113e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall") if (APPLE) set(CMAKE_MACOSX_RPATH ON) else () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-rpath,$ORIGIN") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,$ORIGIN") endif () set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fno-omit-frame-pointer -fsanitize=address")