# 注释或删除掉以下代码, CMP0051已经废弃 if (POLICY CMP0051) # CMake 3.1 and higher include generator expressions of the form # $<TARGETLIB:obj> in the SOURCES property. These need to be # stripped everywhere that access the SOURCES property, so we just # defer to the OLD behavior of not including generator expressions # in the output for now. cmake_policy(SET CMP0051 OLD) endif()
for dirpath, _, filenames in os.walk(root_dir): for filename in filenames: if filename == 'CMakeLists.txt': filepath = os.path.join(dirpath, filename) lines = [] skip_block = False withopen(filepath, 'r') as f: for line in f: if patterns['cmake_version'].match(line): lines.append('cmake_minimum_required(VERSION 3.5)\n') continue if patterns['cmp0051_start'].match(line): skip_block = True lines.append('# ' + line) continue if skip_block: lines.append('# ' + line) if patterns['endif'].match(line): skip_block = False continue lines.append(line) withopen(filepath, 'w') as f: f.writelines(lines) print("✅ CMake配置修复完成")
mkdir -p "/Applications/IDA Professional 9.0.app/Contents/MacOS/plugins" cp keypatch.py "/Applications/IDA Professional 9.0.app/Contents/MacOS/plugins"