OSDN Git Service

[CMake] Add LLVM_ENABLE_IDE option to better process sources for IDE's
authorEric Fiselier <eric@efcs.ca>
Fri, 12 Jan 2018 04:01:41 +0000 (04:01 +0000)
committerEric Fiselier <eric@efcs.ca>
Fri, 12 Jan 2018 04:01:41 +0000 (04:01 +0000)
commit97f96f6d3f1fc88b226992ad7191d6a726575613
tree26c2e8c99b73b9dcbd8de228dd5df09b6c8f9237
parent5a286a00411b4614f6bffc6ccd142575d6ea1b06
[CMake] Add LLVM_ENABLE_IDE option to better process sources for IDE's

Summary:
Currently LLVM has no way to support configuring for IDE's like CLion. Like XCode and MSVC's IDE, CLion needs to see all of the headers and tablegen files in order to properly parse the sources.

This patch adds an `LLVM_ENABLE_IDE` option which can be used to configure for IDE's in general. It is used by `LLVMProcessSources.cmake` to determine if the extra source files should be added to the target.

Unfortunately because of the low level of `LLVMProcessSources.cmake`, I'm not sure where the `LLVM_ENABLE_IDE` option should live. I choose `HandleLLVMOptions.cmake` so that out-of-tree Clang builds would correctly configure the option by default.

Reviewers: beanz, mgorny, lebedev.ri

Reviewed By: beanz

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D40219

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322349 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/HandleLLVMOptions.cmake
cmake/modules/LLVMProcessSources.cmake