[PATCH] Update root CMake to define LLVM_ENABLE_DIA_SDK when appropriate.
Zachary Turner
zturner at google.com
Mon Feb 9 17:58:56 PST 2015
Fix up suggestions from chandlerc. Moved the detection logic into cmake-ix as well, and renamed the variable HAVE_DIA_SDK instead of LLVM_ENABLE_DIA_SDK.
http://reviews.llvm.org/D7457
Files:
cmake/config-ix.cmake
include/llvm/Config/config.h.cmake
include/llvm/Config/config.h.in
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -429,6 +429,22 @@
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 )
Index: include/llvm/Config/config.h.cmake
===================================================================
--- include/llvm/Config/config.h.cmake
+++ 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}
Index: include/llvm/Config/config.h.in
===================================================================
--- include/llvm/Config/config.h.in
+++ 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
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7457.19635.patch
Type: text/x-patch
Size: 1933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150210/8d47273d/attachment.bin>
More information about the llvm-commits
mailing list