diff options
| author | Michal Gorny <mgorny@gentoo.org> | 2017-01-02 18:19:35 +0000 |
|---|---|---|
| committer | Michal Gorny <mgorny@gentoo.org> | 2017-01-02 18:19:35 +0000 |
| commit | 89b6f16b3e8465884aa6f181553cc69270b8ebcd (patch) | |
| tree | fc4b1f3c5254f122665c81ebf7003d68f8b3fae8 /llvm/cmake | |
| parent | 7b83732a4025b5a3c652bfb585628104d995df8d (diff) | |
| download | bcm5719-llvm-89b6f16b3e8465884aa6f181553cc69270b8ebcd.tar.gz bcm5719-llvm-89b6f16b3e8465884aa6f181553cc69270b8ebcd.zip | |
[cmake] Add LLVM_ENABLE_DIA_SDK option, and expose it in LLVMConfig
Add an explicit LLVM_ENABLE_DIA_SDK option to control building support
for DIA SDK-based debugging. Control its value to match whether DIA SDK
support was found and expose it in LLVMConfig (alike LLVM_ENABLE_ZLIB).
Its value is needed for LLDB to determine whether to run tests requiring
DIA support. Currently it is obtained from llvm/Config/config.h;
however, this file is not available for standalone builds. Following
this change, LLDB will be modified to use the value from LLVMConfig.
Differential Revision: https://reviews.llvm.org/D26255
llvm-svn: 290818
Diffstat (limited to 'llvm/cmake')
| -rwxr-xr-x | llvm/cmake/config-ix.cmake | 9 | ||||
| -rw-r--r-- | llvm/cmake/modules/LLVMConfig.cmake.in | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake index 71c1af5bd27..fe3afd3fcc2 100755 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -450,8 +450,15 @@ if( MSVC ) else() set(HAVE_DIA_SDK 0) endif() + + option(LLVM_ENABLE_DIA_SDK "Use MSVC DIA SDK for debugging if available." + ${HAVE_DIA_SDK}) + + if(LLVM_ENABLE_DIA_SDK AND NOT HAVE_DIA_SDK) + message(FATAL_ERROR "DIA SDK not found. If you have both VS 2012 and 2013 installed, you may need to uninstall the former and re-install the latter afterwards.") + endif() else() - set(HAVE_DIA_SDK 0) + set(LLVM_ENABLE_DIA_SDK 0) endif( MSVC ) # FIXME: Signal handler return type, currently hardcoded to 'void' diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in index f7412bac108..c30c92b66d8 100644 --- a/llvm/cmake/modules/LLVMConfig.cmake.in +++ b/llvm/cmake/modules/LLVMConfig.cmake.in @@ -37,6 +37,8 @@ set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@) set(LLVM_ENABLE_ZLIB @LLVM_ENABLE_ZLIB@) +set(LLVM_ENABLE_DIA_SDK @LLVM_ENABLE_DIA_SDK@) + set(LLVM_NATIVE_ARCH @LLVM_NATIVE_ARCH@) set(LLVM_ENABLE_PIC @LLVM_ENABLE_PIC@) |

