Skip to content

Commit a5abb50

Browse files
authored
set CMake policy to auto-enable rpath on MacOS (#348)
1 parent 9769a63 commit a5abb50

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ message("CMAKE_CXX_FLAGS:" ${CMAKE_CXX_FLAGS})
124124
message("CMAKE_C_FLAGS:" ${CMAKE_C_FLAGS})
125125

126126
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
127-
# to suppress warning "MACOSX_RPATH is not specified for the following targets"
128-
set(CMAKE_MACOSX_RPATH 0)
127+
cmake_policy(SET CMP0042 NEW)
129128
endif()
130129

131130
# clean the bin directory

0 commit comments

Comments
 (0)