The CMake install(DIRECTORY) command documents that it sets permissions
on directories it is asked to install. Since the <prefix>/include
directory may not be exclusive to the LLVM installation, we should not
ask CMake to manage permissions of that directory for us. Instead, give
only our own include/llvm and include/llvm-c subdirectories to the
install(DIRECTORY) command.
Fixes PR4500. Patch by Brad King.
llvm-svn: 201075
add_subdirectory(cmake/modules)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
- install(DIRECTORY include/
+ install(DIRECTORY include/llvm include/llvm-c
DESTINATION include
FILES_MATCHING
PATTERN "*.def"
PATTERN ".svn" EXCLUDE
)
- install(DIRECTORY ${LLVM_INCLUDE_DIR}/
+ install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm
DESTINATION include
FILES_MATCHING
PATTERN "*.def"