[PATCH] D26255: [cmake] Rename HAVE_DIA_SDK to LLVM_ENABLE_DIA_SDK, and expose in LLVMConfig
Michał Górny via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 2 12:15:24 PDT 2016
mgorny created this revision.
mgorny added reviewers: zturner, beanz.
mgorny added a subscriber: llvm-commits.
Rename the CMake variable HAVE_DIA_SDK to LLVM_ENABLE_DIA_SDK to match
other variables used in LLVMConfig, and expose it there. Its value is
needed for LLDB to determine whether to run tests requiring DIA support.
Currently the value 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. The config.h name is
not changed to preserve backwards compatibility.
https://reviews.llvm.org/D26255
Files:
cmake/config-ix.cmake
cmake/modules/LLVMConfig.cmake.in
include/llvm/Config/config.h.cmake
lib/DebugInfo/PDB/CMakeLists.txt
test/lit.site.cfg.in
Index: test/lit.site.cfg.in
===================================================================
--- test/lit.site.cfg.in
+++ test/lit.site.cfg.in
@@ -35,7 +35,7 @@
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.have_zlib = "@HAVE_LIBZ@"
config.have_libxar = "@HAVE_LIBXAR@"
-config.have_dia_sdk = @HAVE_DIA_SDK@
+config.have_dia_sdk = @LLVM_ENABLE_DIA_SDK@
config.enable_ffi = "@LLVM_ENABLE_FFI@"
config.test_examples = "@ENABLE_EXAMPLES@"
Index: lib/DebugInfo/PDB/CMakeLists.txt
===================================================================
--- lib/DebugInfo/PDB/CMakeLists.txt
+++ lib/DebugInfo/PDB/CMakeLists.txt
@@ -3,7 +3,7 @@
source_group(${group} FILES ${ARGN})
endmacro()
-if(HAVE_DIA_SDK)
+if(LLVM_ENABLE_DIA_SDK)
include_directories(${MSVC_DIA_SDK_DIR}/include)
set(LIBPDB_LINK_FOLDERS "${MSVC_DIA_SDK_DIR}\\lib")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
Index: include/llvm/Config/config.h.cmake
===================================================================
--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -39,7 +39,7 @@
#cmakedefine01 HAVE_DECL_STRERROR_S
/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
-#cmakedefine01 HAVE_DIA_SDK
+#define HAVE_DIA_SDK ${LLVM_ENABLE_DIA_SDK}
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
Index: cmake/modules/LLVMConfig.cmake.in
===================================================================
--- cmake/modules/LLVMConfig.cmake.in
+++ cmake/modules/LLVMConfig.cmake.in
@@ -37,6 +37,8 @@
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@)
Index: cmake/config-ix.cmake
===================================================================
--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -432,12 +432,12 @@
# 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)
+ set(LLVM_ENABLE_DIA_SDK 1)
else()
- set(HAVE_DIA_SDK 0)
+ set(LLVM_ENABLE_DIA_SDK 0)
endif()
else()
- set(HAVE_DIA_SDK 0)
+ set(LLVM_ENABLE_DIA_SDK 0)
endif( MSVC )
# FIXME: Signal handler return type, currently hardcoded to 'void'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26255.76765.patch
Type: text/x-patch
Size: 2376 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161102/2973ec50/attachment.bin>
More information about the llvm-commits
mailing list