diff options
author | Zachary Turner <zturner@google.com> | 2015-02-10 05:04:25 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2015-02-10 05:04:25 +0000 |
commit | 733b849a3020e6d6d56d6cc760c075dadca02fcb (patch) | |
tree | 276a2ad487f8c86270b0721d518f1b43b276cdbd /llvm | |
parent | bb0aba7a00a71631f05d301189815062e173d470 (diff) | |
download | bcm5719-llvm-733b849a3020e6d6d56d6cc760c075dadca02fcb.tar.gz bcm5719-llvm-733b849a3020e6d6d56d6cc760c075dadca02fcb.zip |
Define HAVE_DIA_SDK on Windows when DIA is present.
This allows all CMake projects, as well as C++ code, to detect if
and when DIA SDK is available for use so that we can enable the
DIA-based PDB reader implementation.
Differential Revision: http://reviews.llvm.org/D7457
Reviewed By: Chandler Carruth
llvm-svn: 228669
Diffstat (limited to 'llvm')
-rwxr-xr-x | llvm/cmake/config-ix.cmake | 16 | ||||
-rw-r--r-- | llvm/include/llvm/Config/config.h.cmake | 3 | ||||
-rw-r--r-- | llvm/include/llvm/Config/config.h.in | 3 |
3 files changed, 22 insertions, 0 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake index c845c070ecd..55727a85f37 100755 --- a/llvm/cmake/config-ix.cmake +++ b/llvm/cmake/config-ix.cmake @@ -429,6 +429,22 @@ if( MSVC ) set(SHLIBEXT ".lib") set(stricmp "_stricmp") set(strdup "_strdup") + + # See if the DIA SDK is available and usable. + set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK") + + # Due to a bug in MSVC 2013's installation software, it is possible + # for MSVC 2013 to write the DIA SDK into the Visual Studio 2012 + # install directory. If this happens, the installation is corrupt + # and there's nothing we can do. It happens with enough frequency + # though that we should handle it. We do so by simply checking that + # the DIA SDK folder exists. Should this happen you will need to + # uninstall VS 2012 and then re-install VS 2013. + if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR}) + set(HAVE_DIA_SDK 1) + else() + set(HAVE_DIA_SDK 0) + endif() endif( MSVC ) if( PURE_WINDOWS ) diff --git a/llvm/include/llvm/Config/config.h.cmake b/llvm/include/llvm/Config/config.h.cmake index c112ea2fc1c..e10df045b4b 100644 --- a/llvm/include/llvm/Config/config.h.cmake +++ b/llvm/include/llvm/Config/config.h.cmake @@ -55,6 +55,9 @@ don't. */ #cmakedefine01 HAVE_DECL_STRERROR_S +/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */ +#cmakedefine HAVE_DIA_SDK ${HAVE_DIA_SDK} + /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #cmakedefine HAVE_DIRENT_H ${HAVE_DIRENT_H} diff --git a/llvm/include/llvm/Config/config.h.in b/llvm/include/llvm/Config/config.h.in index c68c77aa607..9827eeaea33 100644 --- a/llvm/include/llvm/Config/config.h.in +++ b/llvm/include/llvm/Config/config.h.in @@ -67,6 +67,9 @@ don't. */ #undef HAVE_DECL_STRERROR_S +/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */ +#undef HAVE_DIA_SDK + /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H |