Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -17,6 +17,10 @@ cmake_policy(SET CMP0057 NEW) +if(POLICY CMP0068) + cmake_policy(SET CMP0068 NEW) +endif() + if(NOT DEFINED LLVM_VERSION_MAJOR) set(LLVM_VERSION_MAJOR 7) endif() Index: cmake/modules/AddLLVM.cmake =================================================================== --- cmake/modules/AddLLVM.cmake +++ cmake/modules/AddLLVM.cmake @@ -1598,7 +1598,12 @@ return() endif() + if(CMAKE_POLICY_DEFAULT_CMP0068) + set(install_name_dir_property "BUILD_WITH_INSTALL_NAME_DIR On") + endif() + set_target_properties(${name} PROPERTIES + ${install_name_dir_property} BUILD_WITH_INSTALL_RPATH On INSTALL_RPATH "${_install_rpath}" ${_install_name_dir})