从使用cmake构建的llvm中删除INSTALL项目

时间:2014-04-16 22:05:18

标签: build cmake llvm

我正在使用cmake来构建llvm,问题是生成的烦人的小INSTALL项目。我不知道如何删除该项目。我不想安装我的构建组件。任何人都可以帮助我不通过cmake生成INSTALL项目吗?我尝试编辑llvm提供的CmakeLists.txt,并注释掉安装特定的行,如下所示:

#install(DIRECTORY include/
#  DESTINATION include
#  FILES_MATCHING
#  PATTERN "*.def"
#  PATTERN "*.h"
#  PATTERN "*.td"
#  PATTERN "*.inc"
#  PATTERN "LICENSE.TXT"
#  PATTERN ".svn" EXCLUDE
#  )

#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
#  DESTINATION include
#  FILES_MATCHING
#  PATTERN "*.def"
#  PATTERN "*.h"
#  PATTERN "*.gen"
#  PATTERN "*.inc"
  # Exclude include/llvm/CMakeFiles/intrinsics_gen.dir, matched by "*.def"
#  PATTERN "CMakeFiles" EXCLUDE
#  PATTERN ".svn" EXCLUDE
#  )

但这也无济于事。有什么输入吗?

1 个答案:

答案 0 :(得分:0)

llvm源中有几个地方使用了CMake的install命令。您需要删除每个实例才能完全摆脱INSTALL目标。

要查找这些地方,请尝试对所有.txt文件和所有.cmake文件进行递归搜索:

cd <path to root of llvm sources>
findstr /ins install( *.txt
findstr /ins install( *.cmake